 |
|
 |
 |
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::CSourceCommon Class Reference#include <source_common.h>
Inheritance diagram for NLSOUND::CSourceCommon:
List of all members.
Public Types |
| enum | TSOURCE_TYPE { SOURCE_SIMPLE,
SOURCE_COMPLEX,
SOURCE_BACKGROUND
} |
Public Methods |
| | CSourceCommon (TSoundId id, bool spawn, TSpawnEndCallback cb, void *cbUserParam) |
| | ~CSourceCommon () |
| virtual TSOURCE_TYPE | getType () const=0 |
| | Get the type the the source. More...
|
| void | setPriority (TSoundPriority pr) |
| | Change the priority of the source. More...
|
| TSoundPriority | getPriority () const |
| | Return the priority. More...
|
| void | setLooping (bool loop) |
| | Set looping on/off for future playbacks (default: off). More...
|
| bool | getLooping () const |
| | Return the looping state. More...
|
| void | play () |
| | Play. More...
|
| void | stop () |
| | Stop playing. More...
|
| bool | isPlaying () |
| | Get playing state. Return false even if the source has stopped on its own. More...
|
| void | setPos (const NLMISC::CVector &pos) |
| | Set the position vector (default: (0,0,0)). More...
|
| const NLMISC::CVector & | getPos () const |
| | Get the position vector (3D mode only). More...
|
| void | setVelocity (const NLMISC::CVector &vel) |
| | Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). More...
|
| 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...
|
| void | setGain (float gain) |
| | Set the gain (volume value inside [0 , 1]). More...
|
| 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...
|
| float | getRelativeGain () const |
| | Return the relative gain (see setRelativeGain()), or the absolute gain if getSource() is null. More...
|
| void | setSourceRelativeMode (bool mode) |
| | Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false). More...
|
| void * | getCallbackUserParam (void) const |
| | return the user param for the user callback. More...
|
| virtual void | unregisterSpawnCallBack () |
| | Tells this source not to call its callbacks when it ends. This is valid for spawned sources only. More...
|
| virtual void | getVelocity (NLMISC::CVector &vel) const |
| | Get the velocity vector. More...
|
| virtual void | getDirection (NLMISC::CVector &dir) const |
| | Get the direction vector. More...
|
| virtual float | getGain () const |
| | Get the gain. More...
|
| virtual float | getPitch () const |
| | Get the pitch. More...
|
| virtual bool | getSourceRelativeMode () const |
| | Get the source relative mode. More...
|
| void | set3DPositionVector (const NLMISC::CVector *pos) |
| | Set the position vector to return for a stereo source (default: NULL). More...
|
| bool | isSpawn () const |
| | Return the spawn state. More...
|
| virtual void | setPitch (float pitch) |
| | Shift the frequency. More...
|
| virtual uint32 | getTime () |
| | Returns the number of milliseconds the source has been playing. More...
|
Protected Attributes |
| TSoundPriority | _Priority |
| | Shift the frequency. More...
|
| bool | _Playing |
| bool | _Looping |
| NLMISC::CVector | _Position |
| NLMISC::CVector | _Velocity |
| NLMISC::CVector | _Direction |
| float | _Gain |
| float | _Pitch |
| bool | _RelativeMode |
| float | _InitialGain |
| | Gain not affected by setRelativeGain and used to compute _Gain. More...
|
| NLMISC::TTime | _PlayStart |
| const NLMISC::CVector * | _3DPosition |
| const bool | _Spawn |
| TSpawnEndCallback | _SpawnEndCb |
| void * | _CbUserParam |
Member Enumeration Documentation
| enum NLSOUND::CSourceCommon::TSOURCE_TYPE
|
|
Constructor & Destructor Documentation
| NLSOUND::CSourceCommon::~CSourceCommon |
( |
|
) |
|
|
Member Function Documentation
| void* NLSOUND::CSourceCommon::getCallbackUserParam |
( |
void |
|
) |
const [inline] |
|
| virtual void NLSOUND::CSourceCommon::getDirection |
( |
NLMISC::CVector & |
dir |
) |
const [inline, virtual] |
|
| virtual float NLSOUND::CSourceCommon::getGain |
( |
void |
|
) |
const [inline, virtual] |
|
| bool NLSOUND::CSourceCommon::getLooping |
( |
|
) |
const [virtual] |
|
| virtual float NLSOUND::CSourceCommon::getPitch |
( |
void |
|
) |
const [inline, virtual] |
|
| TSoundPriority NLSOUND::CSourceCommon::getPriority |
( |
void |
|
) |
const [inline] |
|
| float NLSOUND::CSourceCommon::getRelativeGain |
( |
|
) |
const [virtual] |
|
| virtual bool NLSOUND::CSourceCommon::getSourceRelativeMode |
( |
|
) |
const [inline, virtual] |
|
| uint32 NLSOUND::CSourceCommon::getTime |
( |
|
) |
[virtual] |
|
| virtual TSOURCE_TYPE NLSOUND::CSourceCommon::getType |
( |
|
) |
const [pure virtual] |
|
| virtual void NLSOUND::CSourceCommon::getVelocity |
( |
NLMISC::CVector & |
vel |
) |
const [inline, virtual] |
|
| bool NLSOUND::CSourceCommon::isPlaying |
( |
|
) |
[inline, virtual] |
|
| bool NLSOUND::CSourceCommon::isSpawn |
( |
|
) |
const [inline] |
|
| void NLSOUND::CSourceCommon::play |
( |
|
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::set3DPositionVector |
( |
const NLMISC::CVector * |
pos |
) |
[inline] |
|
|
|
Set the position vector to return for a stereo source (default: NULL).
Definition at line 86 of file source_common.h.
References _3DPosition. |
| void NLSOUND::CSourceCommon::setDirection |
( |
const NLMISC::CVector & |
dir |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setGain |
( |
float |
gain |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setLooping |
( |
bool |
loop |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setPitch |
( |
float |
pitch |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setPos |
( |
const NLMISC::CVector & |
pos |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setPriority |
( |
TSoundPriority |
pr |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setRelativeGain |
( |
float |
gain |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setSourceRelativeMode |
( |
bool |
mode |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::setVelocity |
( |
const NLMISC::CVector & |
vel |
) |
[virtual] |
|
| void NLSOUND::CSourceCommon::stop |
( |
|
) |
[virtual] |
|
| virtual void NLSOUND::CSourceCommon::unregisterSpawnCallBack |
( |
|
) |
[inline, virtual] |
|
Member Data Documentation
void* NLSOUND::CSourceCommon::_CbUserParam [protected]
|
|
float NLSOUND::CSourceCommon::_Gain [protected]
|
|
|
|
Definition at line 160 of file source_common.h.
Referenced by NLSOUND::CComplexSource::CComplexSource, NLSOUND::CSimpleSource::CSimpleSource, getGain, getRelativeGain, NLSOUND::CComplexSource::onEvent, NLSOUND::CComplexSource::onUpdate, NLSOUND::CBackgroundSource::onUpdate, NLSOUND::CSimpleSource::play, NLSOUND::CComplexSource::play, NLSOUND::CBackgroundSource::play, setGain, NLSOUND::CComplexSource::setGain, NLSOUND::CBackgroundSource::setGain, setRelativeGain, NLSOUND::CSimpleSource::setRelativeGain, NLSOUND::CComplexSource::setRelativeGain, and NLSOUND::CBackgroundSource::setRelativeGain. |
float NLSOUND::CSourceCommon::_InitialGain [protected]
|
|
bool NLSOUND::CSourceCommon::_Looping [protected]
|
|
float NLSOUND::CSourceCommon::_Pitch [protected]
|
|
bool NLSOUND::CSourceCommon::_Playing [protected]
|
|
bool NLSOUND::CSourceCommon::_RelativeMode [protected]
|
|
const bool NLSOUND::CSourceCommon::_Spawn [protected]
|
|
The documentation for this class was generated from the following files:
|
 |