Audio engine changes:
-Idle tick is now responsible for dispatching all pending sound sources, as such improves priority sorting. -Added ui sound precache mechanisms (to fetch sounds without associated soundsources) -Audio engine no logner available pre-login or upon disconnect, for simplicity. -General cleanup to the audio engine/impl. -Fixed some gAudiop calls that were lacking prerequisite null checks. -Added 'isUpstreamOK' procuedure to LLAssetStorage to allow avoidance of making requests when there is no upstream host connection.
This commit is contained in:
@@ -147,7 +147,7 @@ public:
|
||||
const LLVector3d &pos_global = LLVector3d::zero,
|
||||
const LLUUID source_object = LLUUID::null);
|
||||
// </edit>
|
||||
bool preloadSound(const LLUUID &id);
|
||||
bool preloadSound(const LLUUID &id); //Preloads sounds without requiring a source.
|
||||
|
||||
void addAudioSource(LLAudioSource *asp);
|
||||
void cleanupAudioSource(LLAudioSource *asp);
|
||||
@@ -179,8 +179,6 @@ public:
|
||||
bool hasDecodedFile(const LLUUID &uuid);
|
||||
bool hasLocalFile(const LLUUID &uuid);
|
||||
|
||||
bool updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid = LLUUID::null);
|
||||
|
||||
void setAllowLargeSounds(bool allow) { mAllowLargeSounds = allow ;}
|
||||
bool getAllowLargeSounds() const {return mAllowLargeSounds;}
|
||||
|
||||
@@ -244,6 +242,7 @@ public://Jay: IDGAF
|
||||
source_map mAllSources;
|
||||
protected:
|
||||
data_map mAllData;
|
||||
std::list<LLUUID> mPreloadSystemList;
|
||||
LLAudioChannel *mChannels[MAX_CHANNELS];
|
||||
|
||||
// Buffers needs to change into a different data structure, as the number of buffers
|
||||
@@ -287,9 +286,7 @@ public:
|
||||
virtual void update(); // Update this audio source
|
||||
void updatePriority();
|
||||
|
||||
void preload(const LLUUID &audio_id); // Only used for preloading UI sounds, now.
|
||||
|
||||
void addAudioData(LLAudioData *adp, bool set_current = TRUE);
|
||||
void preload(const LLUUID &audio_id);
|
||||
|
||||
void setAmbient(const bool ambient) { mAmbient = ambient; }
|
||||
bool isAmbient() const { return mAmbient; }
|
||||
@@ -450,11 +447,10 @@ protected:
|
||||
virtual void play() = 0;
|
||||
virtual void playSynced(LLAudioChannel *channelp) = 0;
|
||||
virtual void cleanup();
|
||||
void setWaiting(bool waiting) { mWaiting = waiting; }
|
||||
|
||||
public:
|
||||
virtual bool isPlaying() = 0;
|
||||
bool isWaiting() const { return mWaiting; }
|
||||
bool isFree() const { return mCurrentSourcep==NULL; }
|
||||
|
||||
protected:
|
||||
virtual bool updateBuffer(); // Check to see if the buffer associated with the source changed, and update if necessary.
|
||||
@@ -465,7 +461,6 @@ protected:
|
||||
LLAudioSource *mCurrentSourcep;
|
||||
LLAudioBuffer *mCurrentBufferp;
|
||||
bool mLoopedThisFrame;
|
||||
bool mWaiting; // Waiting for sync.
|
||||
F32 mSecondaryGain;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user