|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::CComplexSource Class ReferenceImplemetation class for Complex source.
More...
#include <complex_source.h>
Inheritance diagram for NLSOUND::CComplexSource:
List of all members.
Public Methods |
| CComplexSource (CComplexSound *soundPattern=NULL, bool spawn=false, TSpawnEndCallback cb=0, void *cbUserParam=0) |
| Constructor. More...
|
| ~CComplexSource () |
| Destructor. More...
|
void | setSound (TSoundId id, CSoundContext *context=0) |
| Change the sound binded to the source. More...
|
virtual TSoundId | getSound () |
| Return the sound binded to the source (or NULL if there is no sound). More...
|
virtual void | setPos (const NLMISC::CVector &pos) |
| Set the position vector (default: (0,0,0)). More...
|
virtual void | setVelocity (const NLMISC::CVector &vel) |
| Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). More...
|
virtual void | setDirection (const NLMISC::CVector &dir) |
| Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional). More...
|
virtual void | setGain (float gain) |
| Set the gain (volume value inside [0 , 1]). More...
|
virtual void | setRelativeGain (float gain) |
| Set the gain amount (value inside [0, 1]) to map between 0 and the nominal gain (which is getSource()->getGain()). More...
|
|
virtual void | play () |
| Play. More...
|
virtual void | stop () |
| Stop playing. More...
|
virtual bool | isPlaying () |
| Get playing state. Return false even if the source has stopped on its own. More...
|
virtual uint32 | getTime () |
| Returns the number of milliseconds the source has been playing. More...
|
Private Methods |
TSOURCE_TYPE | getType () const |
| Get the source relative mode. More...
|
void | onUpdate () |
| Mixer update implementation. More...
|
void | onEvent () |
| Mixer event implementation. More...
|
Private Attributes |
USource * | _Source1 |
USource * | _Source2 |
std::vector< USource * > | _AllSources |
NLMISC::TTime | _StartTime1 |
NLMISC::TTime | _StartTime2 |
float | _TickPerSecond |
uint32 | _FadeLength |
float | _FadeFactor |
uint | _SoundSeqIndex |
uint | _DelaySeqIndex |
bool | _LastSparseEvent |
CComplexSound * | _PatternSound |
| The reference Sound. More...
|
Detailed Description
Implemetation class for Complex source.
Complex source are source that use a CPatternSound object.
Definition at line 41 of file complex_source.h.
Constructor & Destructor Documentation
NLSOUND::CComplexSource::~CComplexSource |
( |
|
) |
|
|
Member Function Documentation
TSoundId NLSOUND::CComplexSource::getSound |
( |
|
) |
[virtual] |
|
uint32 NLSOUND::CComplexSource::getTime |
( |
|
) |
[virtual] |
|
TSOURCE_TYPE NLSOUND::CComplexSource::getType |
( |
void |
|
) |
const [inline, private, virtual] |
|
bool NLSOUND::CComplexSource::isPlaying |
( |
|
) |
[virtual] |
|
void NLSOUND::CComplexSource::onEvent |
( |
|
) |
[private, virtual] |
|
|
Mixer event implementation.
Implements NLSOUND::CAudioMixerUser::IMixerEvent.
Definition at line 493 of file complex_source.cpp.
References _DelaySeqIndex, NLSOUND::CSourceCommon::_Gain, _LastSparseEvent, NLSOUND::CSourceCommon::_Looping, _PatternSound, NLSOUND::CSourceCommon::_Playing, NLSOUND::CSourceCommon::_Position, _SoundSeqIndex, _Source1, _Source2, _StartTime1, _StartTime2, _TickPerSecond, NLMISC::CTime::getLocalTime, nlassert, stop, and uint64. |
void NLSOUND::CComplexSource::onUpdate |
( |
|
) |
[private, virtual] |
|
|
Mixer update implementation.
Implements NLSOUND::CAudioMixerUser::IMixerUpdate.
Definition at line 380 of file complex_source.cpp.
References _FadeFactor, _FadeLength, NLSOUND::CSourceCommon::_Gain, _PatternSound, NLSOUND::CSourceCommon::_Playing, _SoundSeqIndex, _Source1, _Source2, _StartTime1, _StartTime2, _TickPerSecond, NLMISC::CTime::getLocalTime, nlassert, nldebug, NLMISC::TTime, and uint32. |
void NLSOUND::CComplexSource::play |
( |
|
) |
[virtual] |
|
|
Play.
Reimplemented from NLSOUND::CSourceCommon.
Definition at line 96 of file complex_source.cpp.
References _AllSources, _DelaySeqIndex, _FadeLength, NLSOUND::CSourceCommon::_Gain, _LastSparseEvent, _PatternSound, NLSOUND::CSourceCommon::_Position, _SoundSeqIndex, _Source1, _Source2, _StartTime1, _StartTime2, _TickPerSecond, NLMISC::CTime::getLocalTime, min, nldebug, uint32, uint64, and NLSOUND::USource::USource. |
void NLSOUND::CComplexSource::setDirection |
( |
const NLMISC::CVector & |
dir |
) |
[virtual] |
|
void NLSOUND::CComplexSource::setGain |
( |
float |
gain |
) |
[virtual] |
|
void NLSOUND::CComplexSource::setPos |
( |
const NLMISC::CVector & |
pos |
) |
[virtual] |
|
void NLSOUND::CComplexSource::setRelativeGain |
( |
float |
gain |
) |
[virtual] |
|
void NLSOUND::CComplexSource::setVelocity |
( |
const NLMISC::CVector & |
vel |
) |
[virtual] |
|
void NLSOUND::CComplexSource::stop |
( |
|
) |
[virtual] |
|
Member Data Documentation
std::vector<USource *> NLSOUND::CComplexSource::_AllSources [private]
|
|
uint NLSOUND::CComplexSource::_DelaySeqIndex [private]
|
|
float NLSOUND::CComplexSource::_FadeFactor [private]
|
|
uint32 NLSOUND::CComplexSource::_FadeLength [private]
|
|
bool NLSOUND::CComplexSource::_LastSparseEvent [private]
|
|
uint NLSOUND::CComplexSource::_SoundSeqIndex [private]
|
|
USource* NLSOUND::CComplexSource::_Source1 [private]
|
|
USource* NLSOUND::CComplexSource::_Source2 [private]
|
|
float NLSOUND::CComplexSource::_TickPerSecond [private]
|
|
The documentation for this class was generated from the following files:
|
|