#include <source.h>
Inheritance diagram for NLSOUND::ISource:
* (top) * z * | y (front) * | / * -----x (right) *
Nevrax France
Definition at line 59 of file source.h.
Source properties | |
virtual void | getCone (float &innerAngle, float &outerAngle, float &outerGain) const=0 |
Get the cone angles (in radian). | |
virtual void | getDirection (NLMISC::CVector &dir) const=0 |
Get the direction vector. | |
virtual float | getGain () const=0 |
Get the gain. | |
virtual void | getMinMaxDistances (float &mindist, float &maxdist) const=0 |
Get the min and max distances. | |
virtual float | getPitch () const=0 |
Get the pitch. | |
virtual const NLMISC::CVector & | getPos () const=0 |
virtual bool | getSourceRelativeMode () const=0 |
Get the source relative mode. | |
virtual void | getVelocity (NLMISC::CVector &vel) const=0 |
Get the velocity vector. | |
virtual void | setAlpha (double a) |
Testing. | |
virtual void | setCone (float innerAngle, float outerAngle, float outerGain)=0 |
Set the cone angles (in radian) and gain (in [0 , 1]) (default: 2PI, 2PI, 0). | |
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). | |
virtual void | setEAXProperty (uint prop, void *value, uint valuesize)=0 |
Set any EAX source property if EAX available. | |
virtual void | setGain (float gain)=0 |
virtual void | setMinMaxDistances (float mindist, float maxdist, bool deferred=true)=0 |
Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only). | |
virtual void | setPitch (float pitch)=0 |
virtual void | setPos (const NLMISC::CVector &pos, bool deffered=true)=0 |
virtual void | setSourceRelativeMode (bool mode)=0 |
Set the source relative mode. If true, positions are interpreted relative to the listener position. | |
virtual void | setVelocity (const NLMISC::CVector &vel, bool deferred=true)=0 |
Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)). | |
Playback control | |
virtual bool | getLooping () const=0 |
Return the looping state. | |
virtual uint32 | getTime () |
Returns the number of milliseconds the source has been playing. | |
virtual bool | isPlaying () const=0 |
Return the playing state. | |
virtual bool | isStopped () const=0 |
Return true if playing is finished or stop() has been called. | |
virtual void | pause ()=0 |
Pause. Call play() to resume. | |
virtual bool | play ()=0 |
virtual void | setLooping (bool l)=0 |
Set looping on/off for future playbacks (default: off). | |
virtual void | stop ()=0 |
Stop playing. | |
virtual bool | update ()=0 |
Update the source (e.g. continue to stream the data in). | |
Initialization | |
virtual IBuffer * | getStaticBuffer ()=0 |
Return the buffer, or NULL if streaming is used. | |
virtual void | setStaticBuffer (IBuffer *buffer)=0 |
virtual void | setStreamLoader (ILoader *loader) |
Public Member Functions | |
ISource () | |
Constructor. | |
virtual | ~ISource () |
Destructor. | |
Protected Attributes | |
ILoader * | _Loader |
|
Constructor.
Definition at line 159 of file source.h. References _Loader.
00159 : /*_Buffer(NULL),*/ _Loader(NULL) {} |
|
Destructor.
Definition at line 162 of file source.h. References _Loader.
00162 { /*_Buffer=NULL;*/ _Loader=NULL; } |
|
Get the cone angles (in radian).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the direction vector.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the gain.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Return the looping state.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the min and max distances.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the pitch.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the position vector. See setPos() for details. Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Get the source relative mode.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Return the buffer, or NULL if streaming is used.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Returns the number of milliseconds the source has been playing.
Reimplemented in NLSOUND::CSourceDSound. Definition at line 101 of file source.h. References uint32. Referenced by NLSOUND::CSimpleSource::getTime().
00101 { return 0; }
|
|
Get the velocity vector.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Return the playing state.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CTrack::isPlaying(). |
|
Return true if playing is finished or stop() has been called.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CTrack::isAvailable(). |
|
Pause. Call play() to resume.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Play the static buffer (or stream in and play). This method can return false if the sample for this sound is unloaded. Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(). |
|
Testing.
Reimplemented in NLSOUND::CSourceDSound. Definition at line 154 of file source.h. Referenced by NLSOUND::CSimpleSource::play().
00154 { } |
|
Set the cone angles (in radian) and gain (in [0 , 1]) (default: 2PI, 2PI, 0).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::setDirection(). |
|
Set the direction vector (3D mode only, ignored in stereo mode) (default: (0,0,0) as non-directional).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::setDirection(). |
|
Set any EAX source property if EAX available.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
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::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), NLSOUND::CSimpleSource::setGain(), and NLSOUND::CSimpleSource::setRelativeGain(). |
|
Set looping on/off for future playbacks (default: off).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::setLooping(). |
|
Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(). |
|
Shift the frequency. 1.0f equals identity, each reduction of 50% equals a pitch shift of one octave. 0 is not a legal value. Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::setPitch(). |
|
Set the position vector (default: (0,0,0)). 3D mode -> 3D position st mode -> x is the pan value (from left (-1) to right (1)), set y and z to 0 Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::setPos(). |
|
Set the source relative mode. If true, positions are interpreted relative to the listener position.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::setSourceRelativeMode(). |
|
Set the buffer that will be played (no streaming) If the buffer is stereo, the source mode becomes stereo and the source relative mode is on, otherwise the source is considered as a 3D source. Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::stop(). |
|
Set the sound loader that will be used to stream in the data to play If the buffer is stereo, the source mode becomes stereo and the source relative mode is on, otherwise the source is considered as a 3D source. Definition at line 76 of file source.h. References _Loader.
00076 { _Loader = loader; } |
|
Set the velocity vector (3D mode only, ignored in stereo mode) (default: (0,0,0)).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::play(), and NLSOUND::CSimpleSource::setVelocity(). |
|
Stop playing.
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. Referenced by NLSOUND::CSimpleSource::stop(). |
|
Update the source (e.g. continue to stream the data in).
Implemented in NLSOUND::CSourceDSound, and NLSOUND::CSourceAL. |
|
Definition at line 170 of file source.h. Referenced by ISource(), setStreamLoader(), and ~ISource(). |