diff options
Diffstat (limited to 'indra/llaudio')
| -rw-r--r-- | indra/llaudio/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | indra/llaudio/llaudioengine.cpp | 4 | ||||
| -rw-r--r-- | indra/llaudio/llaudioengine.h | 24 | 
3 files changed, 32 insertions, 0 deletions
| diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index f27bcb27d1..1b2bdb9888 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -80,6 +80,10 @@ list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})  add_library (llaudio ${llaudio_SOURCE_FILES})  target_link_libraries(      llaudio +    ${LLCOMMON_LIBRARIES} +    ${LLMATH_LIBRARIES} +    ${LLMESSAGE_LIBRARIES} +    ${LLVFS_LIBRARIES}      ${VORBISENC_LIBRARIES}      ${VORBISFILE_LIBRARIES}      ${VORBIS_LIBRARIES} diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index ef560cd7fc..06e752cf34 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -839,6 +839,10 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i  	asp->play(audio_uuid);  } +void LLAudioEngine::triggerSound(SoundData& soundData) +{ +	triggerSound(soundData.audio_uuid, soundData.owner_id, soundData.gain, soundData.type, soundData.pos_global); +}  void LLAudioEngine::setListenerPos(LLVector3 aVec)  { diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index dbaba0fb91..da1629a1db 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -65,6 +65,7 @@ class LLAudioChannel;  class LLAudioChannelOpenAL;  class LLAudioBuffer;  class LLStreamingAudioInterface; +struct SoundData;  // @@ -143,6 +144,8 @@ public:  	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); +	void triggerSound(SoundData& soundData); +  	bool preloadSound(const LLUUID &id);  	void addAudioSource(LLAudioSource *asp); @@ -455,6 +458,27 @@ protected:  	LLFrameTimer mLastUseTimer;  }; +struct SoundData +{ +	LLUUID audio_uuid; +	LLUUID owner_id; +	F32 gain; +	S32 type; +	LLVector3d pos_global; + +	SoundData(const LLUUID &audio_uuid,  +		const LLUUID& owner_id,  +		const F32 gain, 					   +		const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, +		const LLVector3d &pos_global = LLVector3d::zero) +	{ +		this->audio_uuid = audio_uuid; +		this->owner_id = owner_id; +		this->gain = gain; +		this->type = type; +		this->pos_global = pos_global; +	} +};  extern LLAudioEngine* gAudiop; | 
