|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::USource Class ReferenceGame interface for sound sources (stereo or 3D sound instances).
More...
#include <u_source.h>
Inheritance diagram for NLSOUND::USource:
List of all members.
Public Methods |
virtual TSoundId | getSound ()=0 |
| Return the sound binded to the source (or NULL if there is no sound). More...
|
virtual void | setPriority (TSoundPriority pr)=0 |
| Change the priority of the source. More...
|
virtual | ~USource () |
| Destructor. More...
|
|
virtual void | setLooping (bool l)=0 |
| Set looping on/off for future playbacks (default: off). More...
|
virtual bool | getLooping () const=0 |
| Return the looping state. More...
|
virtual void | play ()=0 |
| Play. More...
|
virtual void | stop ()=0 |
| Stop playing. More...
|
virtual bool | isPlaying ()=0 |
| Get playing state. Return false even if the source has stopped on its own. More...
|
virtual void | unregisterSpawnCallBack ()=0 |
| Tells this source not to call its callbacks when it ends. This is valid for spawned sources only. More...
|
virtual uint32 | getTime ()=0 |
| Returns the number of milliseconds the source has been playing. More...
|
|
virtual void | setPos (const NLMISC::CVector &pos)=0 |
| Set the position vector (default: (0,0,0)). More...
|
virtual const NLMISC::CVector & | getPos () const=0 |
| Get the position vector (3D mode only). More...
|
virtual void | setVelocity (const NLMISC::CVector &vel)=0 |
| Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). More...
|
virtual void | getVelocity (NLMISC::CVector &vel) const=0 |
| Get the velocity vector. More...
|
virtual void | setDirection (const NLMISC::CVector &dir)=0 |
| Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional). More...
|
virtual void | getDirection (NLMISC::CVector &dir) const=0 |
| Get the direction vector. More...
|
virtual void | setGain (float gain)=0 |
| Set the gain (volume value inside [0 , 1]). More...
|
virtual float | getGain () const=0 |
| Get the gain. More...
|
virtual void | setRelativeGain (float gain)=0 |
| Set the gain amount (value inside [0, 1]) to map between 0 and the nominal gain (which is getSource()->getGain()). More...
|
virtual float | getRelativeGain () const=0 |
| Return the relative gain (see setRelativeGain()), or the absolute gain if getSource() is null. More...
|
virtual void | setPitch (float pitch)=0 |
| Shift the frequency. More...
|
virtual float | getPitch () const=0 |
| Get the pitch. More...
|
virtual void | setSourceRelativeMode (bool mode)=0 |
| Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false). More...
|
virtual bool | getSourceRelativeMode () const=0 |
| Get the source relative mode. More...
|
Protected Methods |
| USource () |
| Constructor. More...
|
Detailed Description
Game interface for sound sources (stereo or 3D sound instances).
The mode is 3D if the sound buffer (specified by its Sound Id) is mono, otherwise it is stereo.
For arguments as 3D vectors, use the NeL vector coordinate system:
* (top)
* z
* | y (front)
* | /
* -----x (right)
*
* The default priority is MidPri.
* Some properties are assigned at initialization's time, from the
* specified sound id (use NeL Sources Sound Builder to set these
* initial values).
*
* -
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2001
Definition at line 103 of file u_source.h.
Constructor & Destructor Documentation
virtual NLSOUND::USource::~USource |
( |
|
) |
[inline, virtual] |
|
NLSOUND::USource::USource |
( |
|
) |
[inline, protected] |
|
Member Function Documentation
virtual void NLSOUND::USource::getDirection |
( |
NLMISC::CVector & |
dir |
) |
const [pure virtual] |
|
virtual float NLSOUND::USource::getGain |
( |
|
) |
const [pure virtual] |
|
virtual bool NLSOUND::USource::getLooping |
( |
|
) |
const [pure virtual] |
|
virtual float NLSOUND::USource::getPitch |
( |
|
) |
const [pure virtual] |
|
virtual const NLMISC::CVector& NLSOUND::USource::getPos |
( |
|
) |
const [pure virtual] |
|
virtual float NLSOUND::USource::getRelativeGain |
( |
|
) |
const [pure virtual] |
|
virtual TSoundId NLSOUND::USource::getSound |
( |
|
) |
[pure virtual] |
|
|
Return the sound binded to the source (or NULL if there is no sound).
The source must be of the same type as the source (ie simple or complex or background sound).
Implemented in NLSOUND::CBackgroundSource. |
virtual bool NLSOUND::USource::getSourceRelativeMode |
( |
|
) |
const [pure virtual] |
|
virtual uint32 NLSOUND::USource::getTime |
( |
|
) |
[pure virtual] |
|
virtual void NLSOUND::USource::getVelocity |
( |
NLMISC::CVector & |
vel |
) |
const [pure virtual] |
|
virtual bool NLSOUND::USource::isPlaying |
( |
|
) |
[pure virtual] |
|
virtual void NLSOUND::USource::play |
( |
|
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setDirection |
( |
const NLMISC::CVector & |
dir |
) |
[pure virtual] |
|
|
Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional).
Implemented in NLSOUND::CBackgroundSource. |
virtual void NLSOUND::USource::setGain |
( |
float |
gain |
) |
[pure virtual] |
|
|
Set the gain (volume value inside [0 , 1]).
(default: 1) 0.0 -> silence 0.5 -> -6dB 1.0 -> no attenuation values > 1 (amplification) not supported by most drivers
Implemented in NLSOUND::CBackgroundSource. |
virtual void NLSOUND::USource::setLooping |
( |
bool |
l |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setPitch |
( |
float |
pitch |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setPos |
( |
const NLMISC::CVector & |
pos |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setPriority |
( |
TSoundPriority |
pr |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setRelativeGain |
( |
float |
gain |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::setSourceRelativeMode |
( |
bool |
mode |
) |
[pure virtual] |
|
|
Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false).
Implemented in NLSOUND::CSimpleSource. |
virtual void NLSOUND::USource::setVelocity |
( |
const NLMISC::CVector & |
vel |
) |
[pure virtual] |
|
virtual void NLSOUND::USource::stop |
( |
|
) |
[pure virtual] |
|
virtual void NLSOUND::USource::unregisterSpawnCallBack |
( |
|
) |
[pure virtual] |
|
The documentation for this class was generated from the following file:
|
|