LLAudioSource Class Reference

#include <audioengine.h>

Inheritance diagram for LLAudioSource:

Inheritance graph
[legend]
Collaboration diagram for LLAudioSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLAudioSource (const LLUUID &id, const LLUUID &owner_id, const F32 gain)
virtual ~LLAudioSource ()
virtual void update ()
void updatePriority ()
void preload (const LLUUID &audio_id)
void addAudioData (LLAudioData *adp, BOOL set_current=TRUE)
void setAmbient (const BOOL ambient)
BOOL isAmbient () const
void setLoop (const BOOL loop)
BOOL isLoop () const
void setSyncMaster (const BOOL master)
BOOL isSyncMaster () const
void setSyncSlave (const BOOL slave)
BOOL isSyncSlave () const
void setQueueSounds (const BOOL queue)
BOOL isQueueSounds () const
void setPlayedOnce (const BOOL played_once)
void setPositionGlobal (const LLVector3d &position_global)
LLVector3d getPositionGlobal () const
LLVector3 getVelocity () const
F32 getPriority () const
F32 getGain () const
virtual void setGain (const F32 gain)
const LLUUIDgetID () const
BOOL isDone ()
LLAudioDatagetCurrentData ()
LLAudioDatagetQueuedData ()
LLAudioBuffergetCurrentBuffer ()
BOOL setupChannel ()
BOOL play (const LLUUID &audio_id)
const LLUUIDgetOwnerID ()
BOOL hasPendingPreloads () const

Protected Types

typedef std::map< LLUUID,
LLAudioData * > 
data_map

Protected Member Functions

void setChannel (LLAudioChannel *channelp)
LLAudioChannelgetChannel () const

Protected Attributes

LLUUID mID
LLUUID mOwnerID
F32 mPriority
F32 mGain
BOOL mAmbient
BOOL mLoop
BOOL mSyncMaster
BOOL mSyncSlave
BOOL mQueueSounds
BOOL mPlayedOnce
LLVector3d mPositionGlobal
LLVector3 mVelocity
LLAudioChannelmChannelp
LLAudioDatamCurrentDatap
LLAudioDatamQueuedDatap
data_map mPreloadMap
LLFrameTimer mAgeTimer

Friends

class LLAudioEngine
class LLAudioChannel

Detailed Description

Definition at line 246 of file audioengine.h.


Member Typedef Documentation

typedef std::map<LLUUID, LLAudioData *> LLAudioSource::data_map [protected]

Definition at line 325 of file audioengine.h.


Constructor & Destructor Documentation

LLAudioSource::LLAudioSource ( const LLUUID id,
const LLUUID owner_id,
const F32  gain 
)

Definition at line 1170 of file audioengine.cpp.

LLAudioSource::~LLAudioSource (  )  [virtual]

Definition at line 1188 of file audioengine.cpp.

References mChannelp, NULL, and LLAudioChannel::setSource().


Member Function Documentation

void LLAudioSource::addAudioData ( LLAudioData adp,
BOOL  set_current = TRUE 
)

Definition at line 1387 of file audioengine.cpp.

References gAudiop, LLAudioData::getID(), isLoop(), mChannelp, mCurrentDatap, mPreloadMap, mQueuedDatap, mQueueSounds, LLAudioChannel::play(), LLAudioEngine::startNextTransfer(), and LLAudioChannel::updateBuffer().

Referenced by play(), and process_preload_sound().

LLAudioChannel* LLAudioSource::getChannel (  )  const [inline, protected]

Definition at line 304 of file audioengine.h.

References mChannelp.

Referenced by LLAudioEngine::idle(), and play().

LLAudioBuffer * LLAudioSource::getCurrentBuffer (  ) 

Definition at line 1483 of file audioengine.cpp.

References LLAudioData::getBuffer(), mCurrentDatap, and NULL.

Referenced by update(), LLAudioChannelFMOD::updateBuffer(), and LLAudioChannel::updateBuffer().

LLAudioData * LLAudioSource::getCurrentData (  ) 

Definition at line 1473 of file audioengine.cpp.

References mCurrentDatap.

Referenced by LLFloaterEventLog::logObject(), LLViewerObject::setAttachedSound(), setupChannel(), LLAudioEngine::startNextTransfer(), and update().

F32 LLAudioSource::getGain (  )  const [inline]

Definition at line 284 of file audioengine.h.

References mGain.

Referenced by LLAudioChannelFMOD::updateBuffer().

const LLUUID& LLAudioSource::getID (  )  const [inline]

Definition at line 287 of file audioengine.h.

References mID.

Referenced by LLAudioEngine::addAudioSource(), LLAudioEngine::cleanupAudioSource(), and update().

const LLUUID& LLAudioSource::getOwnerID (  )  [inline]

Definition at line 297 of file audioengine.h.

References mOwnerID.

LLVector3d LLAudioSource::getPositionGlobal (  )  const [inline]

Definition at line 279 of file audioengine.h.

References mPositionGlobal.

Referenced by LLAudioChannelFMOD::update3DPosition(), and updatePriority().

F32 LLAudioSource::getPriority (  )  const [inline]

Definition at line 281 of file audioengine.h.

References mPriority.

Referenced by LLAudioEngine::getFreeChannel(), setupChannel(), and LLAudioEngine::startNextTransfer().

LLAudioData * LLAudioSource::getQueuedData (  ) 

Definition at line 1478 of file audioengine.cpp.

References mQueuedDatap.

Referenced by LLAudioEngine::startNextTransfer().

LLVector3 LLAudioSource::getVelocity (  )  const [inline]

Definition at line 280 of file audioengine.h.

References mVelocity.

Referenced by LLAudioChannelFMOD::update3DPosition().

BOOL LLAudioSource::hasPendingPreloads (  )  const

Definition at line 1455 of file audioengine.cpp.

References FALSE, mPreloadMap, and TRUE.

Referenced by isDone(), and LLViewerObject::setAttachedSound().

BOOL LLAudioSource::isAmbient (  )  const [inline]

Definition at line 262 of file audioengine.h.

References mAmbient.

Referenced by LLAudioChannelFMOD::update3DPosition(), and updatePriority().

BOOL LLAudioSource::isDone (  ) 

Definition at line 1323 of file audioengine.cpp.

References FALSE, LLFrameTimer::getElapsedTimeF32(), hasPendingPreloads(), isLoop(), LLAudioChannel::isPlaying(), mAgeTimer, mChannelp, mPlayedOnce, mQueuedDatap, and TRUE.

Referenced by LLViewerObject::setAttachedSound().

BOOL LLAudioSource::isLoop (  )  const [inline]

Definition at line 265 of file audioengine.h.

References mLoop.

Referenced by addAudioData(), isDone(), LLViewerObject::setAttachedSound(), LLAudioChannelFMOD::updateBuffer(), and LLViewerObject::updateLOD().

BOOL LLAudioSource::isQueueSounds (  )  const [inline]

Definition at line 274 of file audioengine.h.

References mQueueSounds.

BOOL LLAudioSource::isSyncMaster (  )  const [inline]

Definition at line 268 of file audioengine.h.

References mSyncMaster.

BOOL LLAudioSource::isSyncSlave (  )  const [inline]

Definition at line 271 of file audioengine.h.

References mSyncSlave.

Referenced by LLAudioEngine::idle(), and play().

BOOL LLAudioSource::play ( const LLUUID audio_id  ) 

Definition at line 1278 of file audioengine.cpp.

References addAudioData(), FALSE, gAudiop, LLAudioEngine::getAudioData(), getChannel(), LLUUID::isNull(), isSyncSlave(), mAgeTimer, NULL, LLAudioChannel::play(), LLFrameTimer::reset(), setChannel(), LLAudioChannel::setSource(), setupChannel(), LLAudioChannel::setWaiting(), TRUE, and LLAudioEngine::updateBufferForData().

Referenced by LLViewerObject::setAttachedSound(), LLAudioEngine::triggerSound(), and update().

void LLAudioSource::preload ( const LLUUID audio_id  ) 

void LLAudioSource::setAmbient ( const BOOL  ambient  )  [inline]

Definition at line 261 of file audioengine.h.

References mAmbient.

Referenced by LLAudioSourceVO::LLAudioSourceVO(), and LLAudioEngine::triggerSound().

void LLAudioSource::setChannel ( LLAudioChannel channelp  )  [protected]

Definition at line 1199 of file audioengine.cpp.

References mChannelp.

Referenced by LLAudioEngine::getFreeChannel(), LLAudioEngine::idle(), play(), setupChannel(), and LLAudioChannel::~LLAudioChannel().

virtual void LLAudioSource::setGain ( const F32  gain  )  [inline, virtual]

Reimplemented in LLAudioSourceVO.

Definition at line 285 of file audioengine.h.

References f, llclamp(), and mGain.

void LLAudioSource::setLoop ( const BOOL  loop  )  [inline]

Definition at line 264 of file audioengine.h.

References mLoop.

Referenced by LLViewerObject::setAttachedSound().

void LLAudioSource::setPlayedOnce ( const BOOL  played_once  )  [inline]

Definition at line 276 of file audioengine.h.

References mPlayedOnce.

Referenced by LLAudioChannelFMOD::play().

void LLAudioSource::setPositionGlobal ( const LLVector3d position_global  )  [inline]

Definition at line 278 of file audioengine.h.

References mPositionGlobal.

Referenced by LLAudioEngine::triggerSound().

void LLAudioSource::setQueueSounds ( const BOOL  queue  )  [inline]

Definition at line 273 of file audioengine.h.

References mQueueSounds.

Referenced by LLViewerObject::setAttachedSound().

void LLAudioSource::setSyncMaster ( const BOOL  master  )  [inline]

Definition at line 267 of file audioengine.h.

References mSyncMaster.

Referenced by LLViewerObject::setAttachedSound().

void LLAudioSource::setSyncSlave ( const BOOL  slave  )  [inline]

Definition at line 270 of file audioengine.h.

References mSyncSlave.

Referenced by LLViewerObject::setAttachedSound().

BOOL LLAudioSource::setupChannel (  ) 

Definition at line 1244 of file audioengine.cpp.

References FALSE, gAudiop, LLAudioData::getBuffer(), getCurrentData(), LLAudioEngine::getFreeChannel(), getPriority(), mChannelp, setChannel(), LLAudioChannel::setSource(), TRUE, and updatePriority().

Referenced by play().

void LLAudioSource::update (  )  [virtual]

Reimplemented in LLAudioSourceVO.

Definition at line 1210 of file audioengine.cpp.

References getCurrentBuffer(), getCurrentData(), getID(), and play().

Referenced by LLAudioSourceVO::update().

void LLAudioSource::updatePriority (  ) 

Definition at line 1226 of file audioengine.cpp.

References dist_vec(), f, gAudiop, LLAudioEngine::getListenerPos(), getPositionGlobal(), isAmbient(), llmax(), mGain, and mPriority.

Referenced by setupChannel(), and LLAudioEngine::triggerSound().


Friends And Related Function Documentation

friend class LLAudioChannel [friend]

Definition at line 301 of file audioengine.h.

friend class LLAudioEngine [friend]

Definition at line 300 of file audioengine.h.


Member Data Documentation

LLFrameTimer LLAudioSource::mAgeTimer [protected]

Definition at line 328 of file audioengine.h.

Referenced by isDone(), and play().

BOOL LLAudioSource::mAmbient [protected]

Definition at line 311 of file audioengine.h.

Referenced by isAmbient(), and setAmbient().

LLAudioChannel* LLAudioSource::mChannelp [protected]

Definition at line 321 of file audioengine.h.

Referenced by addAudioData(), getChannel(), isDone(), setChannel(), setupChannel(), and ~LLAudioSource().

LLAudioData* LLAudioSource::mCurrentDatap [protected]

Definition at line 322 of file audioengine.h.

Referenced by addAudioData(), getCurrentBuffer(), and getCurrentData().

F32 LLAudioSource::mGain [protected]

Definition at line 310 of file audioengine.h.

Referenced by getGain(), setGain(), LLAudioSourceVO::updateGain(), and updatePriority().

LLUUID LLAudioSource::mID [protected]

Definition at line 307 of file audioengine.h.

Referenced by getID().

BOOL LLAudioSource::mLoop [protected]

Definition at line 312 of file audioengine.h.

Referenced by isLoop(), and setLoop().

LLUUID LLAudioSource::mOwnerID [protected]

Definition at line 308 of file audioengine.h.

Referenced by getOwnerID(), and LLAudioSourceVO::updateGain().

BOOL LLAudioSource::mPlayedOnce [protected]

Definition at line 316 of file audioengine.h.

Referenced by isDone(), and setPlayedOnce().

LLVector3d LLAudioSource::mPositionGlobal [protected]

Definition at line 317 of file audioengine.h.

Referenced by getPositionGlobal(), setPositionGlobal(), and LLAudioSourceVO::update().

data_map LLAudioSource::mPreloadMap [protected]

Definition at line 326 of file audioengine.h.

Referenced by addAudioData(), hasPendingPreloads(), and LLAudioEngine::startNextTransfer().

F32 LLAudioSource::mPriority [protected]

Definition at line 309 of file audioengine.h.

Referenced by getPriority(), and updatePriority().

LLAudioData* LLAudioSource::mQueuedDatap [protected]

Definition at line 323 of file audioengine.h.

Referenced by addAudioData(), getQueuedData(), and isDone().

BOOL LLAudioSource::mQueueSounds [protected]

Definition at line 315 of file audioengine.h.

Referenced by addAudioData(), isQueueSounds(), and setQueueSounds().

BOOL LLAudioSource::mSyncMaster [protected]

Definition at line 313 of file audioengine.h.

Referenced by isSyncMaster(), and setSyncMaster().

BOOL LLAudioSource::mSyncSlave [protected]

Definition at line 314 of file audioengine.h.

Referenced by isSyncSlave(), and setSyncSlave().

LLVector3 LLAudioSource::mVelocity [protected]

Definition at line 318 of file audioengine.h.

Referenced by getVelocity(), and LLAudioSourceVO::update().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:10 2010 for Second Life Viewer by  doxygen 1.4.7