Massive commit, beefed up the audio crash prevention, made a blacklist for assets, added sound explorer, fixed import, added item button to vfs explorer.

JELLY ROLL
This commit is contained in:
phr0z3nt04st
2010-07-08 00:20:37 -05:00
parent 30f5ce7491
commit 82aef8fa4c
27 changed files with 1232 additions and 61 deletions

View File

@@ -139,7 +139,11 @@ public:
// Owner ID is the owner of the object making the request
void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain,
const S32 type = LLAudioEngine::AUDIO_TYPE_NONE,
const LLVector3d &pos_global = LLVector3d::zero);
// <edit>
//const LLVector3d &pos_global = LLVector3d::zero);
const LLVector3d &pos_global = LLVector3d::zero,
const LLUUID source_object = LLUUID::null);
// </edit>
bool preloadSound(const LLUUID &id);
void addAudioSource(LLAudioSource *asp);
@@ -261,7 +265,10 @@ class LLAudioSource
public:
// owner_id is the id of the agent responsible for making this sound
// play, for example, the owner of the object currently playing it
LLAudioSource(const LLUUID &id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE);
// <edit>
//LLAudioSource(const LLUUID &id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE);
LLAudioSource(const LLUUID &id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, const LLUUID source_id = LLUUID::null, const bool isTrigger = true);
// </edit>
virtual ~LLAudioSource();
virtual void update(); // Update this audio source
@@ -301,6 +308,9 @@ public:
virtual void setGain(const F32 gain) { mGain = llclamp(gain, 0.f, 1.f); }
const LLUUID &getID() const { return mID; }
// <edit>
const LLUUID &getLogID() const { return mLogID; }
// </edit>
bool isDone() const;
bool isMuted() const { return mSourceMuted; }
@@ -334,6 +344,11 @@ protected:
S32 mType;
LLVector3d mPositionGlobal;
LLVector3 mVelocity;
// <edit>
LLUUID mLogID;
LLUUID mSourceID;
bool mIsTrigger;
// </edit>
//LLAudioSource *mSyncMasterp; // If we're a slave, the source that we're synced to.
LLAudioChannel *mChannelp; // If we're currently playing back, this is the channel that we're assigned to.
@@ -452,4 +467,32 @@ protected:
extern LLAudioEngine* gAudiop;
// <edit>
typedef struct
{
LLUUID mID;
LLVector3d mPosition;
S32 mType;
bool mPlaying;
LLUUID mAssetID;
LLUUID mOwnerID;
LLUUID mSourceID;
bool mIsTrigger;
bool mIsLooped;
F64 mTimeStarted;
F64 mTimeStopped;
bool mReviewed;
bool mReviewedCollision;
LLAudioSource* mAudioSource;
} LLSoundHistoryItem;
extern std::map<LLUUID, LLSoundHistoryItem> gSoundHistory;
static void logSoundPlay(LLUUID id, LLAudioSource* audio_source, LLVector3d position, S32 type, LLUUID assetid, LLUUID ownerid, LLUUID sourceid, bool is_trigger, bool is_looped);
static void logSoundStop(LLUUID id);
static void pruneSoundLog();
static int gSoundHistoryPruneCounter;
// </edit>
#endif