|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::CSourceAL Class ReferenceOpenAL sound source.
More...
#include <source_al.h>
Inheritance diagram for NLSOUND::CSourceAL:
List of all members.
Public Methods |
| CSourceAL (ALuint sourcename=AL_NONE) |
| Constructor. More...
|
virtual | ~CSourceAL () |
| Destructor. More...
|
ALuint | sourceName () |
| Return the OpenAL source name. More...
|
|
virtual void | setStaticBuffer (IBuffer *buffer) |
| 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. More...
|
|
virtual void | setLooping (bool l) |
| Set looping on/off for future playbacks (default: off). More...
|
virtual bool | getLooping () const |
| Return the looping state. More...
|
virtual bool | play () |
| Play the static buffer (or stream in and play). More...
|
virtual void | stop () |
| Stop playing. More...
|
virtual void | pause () |
| Pause. Call play() to resume. More...
|
virtual bool | isPlaying () const |
| Return the playing state. More...
|
virtual bool | isStopped () const |
| Return true if playing is finished or stop() has been called. More...
|
virtual void | update () |
| Update the source (e.g. continue to stream the data in). More...
|
|
virtual void | setPos (const NLMISC::CVector &pos) |
| Set the position vector (default: (0,0,0)). More...
|
virtual const NLMISC::CVector & | getPos () const |
| Get the position vector. More...
|
virtual void | setVelocity (const NLMISC::CVector &vel, bool deferred) |
| Set the velocity vector (3D mode only) (default: (0,0,0)). More...
|
virtual void | getVelocity (NLMISC::CVector &vel) const |
| Get the velocity vector. More...
|
virtual void | setDirection (const NLMISC::CVector &dir) |
| Set the direction vector (3D mode only) (default: (0,0,0) as non-directional). More...
|
virtual void | getDirection (NLMISC::CVector &dir) const |
| Get the direction vector. More...
|
virtual void | setGain (float gain) |
| 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. More...
|
virtual float | getGain () const |
| Get the gain. More...
|
virtual void | setPitch (float pitch) |
| Shift the frequency. More...
|
virtual float | getPitch () const |
| Get the pitch. More...
|
virtual void | setSourceRelativeMode (bool mode) |
| Set the source relative mode. If true, positions are interpreted relative to the listener position (default: false). More...
|
virtual bool | getSourceRelativeMode () const |
| Get the source relative mode. More...
|
virtual void | setMinMaxDistances (float mindist, float maxdist, bool deferred) |
| Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only). More...
|
virtual void | getMinMaxDistances (float &mindist, float &maxdist) const |
| Get the min and max distances. More...
|
virtual void | setCone (float innerAngle, float outerAngle, float outerGain) |
| Set the cone angles (in radian) and gain (in [0 , 1]) (default: 2PI, 2PI, 0) (3D mode only). More...
|
virtual void | getCone (float &innerAngle, float &outerAngle, float &outerGain) const |
| Get the cone angles (in radian). More...
|
virtual void | setEAXProperty (uint prop, void *value, uint valuesize) |
| Set any EAX source property if EAX available. More...
|
Private Attributes |
ALuint | _SourceName |
NLMISC::CVector | _Pos |
Detailed Description
OpenAL sound source.
Note: the creation/deletion of sources and the setting of their rolloff factor are done in CSoundDriverAL.
The EAX extensions are not available on all sound cards, and currently not at all on Linux.
For arguments as 3D vectors, use the NeL vector coordinate system (not OpenAL/OpenGL's one).
-
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2001
Definition at line 53 of file source_al.h.
Constructor & Destructor Documentation
NLSOUND::CSourceAL::CSourceAL |
( |
ALuint |
sourcename = AL_NONE |
) |
|
|
NLSOUND::CSourceAL::~CSourceAL |
( |
|
) |
[virtual] |
|
Member Function Documentation
void NLSOUND::CSourceAL::getCone |
( |
float & |
innerAngle, |
|
|
float & |
outerAngle, |
|
|
float & |
outerGain |
|
) |
const [virtual] |
|
void NLSOUND::CSourceAL::getDirection |
( |
NLMISC::CVector & |
dir |
) |
const [virtual] |
|
float NLSOUND::CSourceAL::getGain |
( |
|
) |
const [virtual] |
|
bool NLSOUND::CSourceAL::getLooping |
( |
|
) |
const [virtual] |
|
void NLSOUND::CSourceAL::getMinMaxDistances |
( |
float & |
mindist, |
|
|
float & |
maxdist |
|
) |
const [virtual] |
|
float NLSOUND::CSourceAL::getPitch |
( |
|
) |
const [virtual] |
|
bool NLSOUND::CSourceAL::getSourceRelativeMode |
( |
|
) |
const [virtual] |
|
void NLSOUND::CSourceAL::getVelocity |
( |
NLMISC::CVector & |
vel |
) |
const [virtual] |
|
bool NLSOUND::CSourceAL::isPlaying |
( |
|
) |
const [virtual] |
|
bool NLSOUND::CSourceAL::isStopped |
( |
|
) |
const [virtual] |
|
void NLSOUND::CSourceAL::pause |
( |
|
) |
[virtual] |
|
bool NLSOUND::CSourceAL::play |
( |
|
) |
[virtual] |
|
void NLSOUND::CSourceAL::setCone |
( |
float |
innerAngle, |
|
|
float |
outerAngle, |
|
|
float |
outerGain |
|
) |
[virtual] |
|
void NLSOUND::CSourceAL::setDirection |
( |
const NLMISC::CVector & |
dir |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setEAXProperty |
( |
uint |
prop, |
|
|
void * |
value, |
|
|
uint |
valuesize |
|
) |
[virtual] |
|
void NLSOUND::CSourceAL::setGain |
( |
float |
gain |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setLooping |
( |
bool |
l |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setMinMaxDistances |
( |
float |
mindist, |
|
|
float |
maxdist, |
|
|
bool |
deferred |
|
) |
[virtual] |
|
void NLSOUND::CSourceAL::setPitch |
( |
float |
pitch |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setSourceRelativeMode |
( |
bool |
mode |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setStaticBuffer |
( |
IBuffer * |
buffer |
) |
[virtual] |
|
void NLSOUND::CSourceAL::setVelocity |
( |
const NLMISC::CVector & |
vel, |
|
|
bool |
deferred |
|
) |
[virtual] |
|
ALuint NLSOUND::CSourceAL::sourceName |
( |
|
) |
[inline] |
|
void NLSOUND::CSourceAL::stop |
( |
|
) |
[virtual] |
|
void NLSOUND::CSourceAL::update |
( |
|
) |
[virtual] |
|
Member Data Documentation
ALuint NLSOUND::CSourceAL::_SourceName [private]
|
|
|
Definition at line 154 of file source_al.h.
Referenced by getCone, getDirection, getGain, getLooping, getMinMaxDistances, getPitch, getSourceRelativeMode, getVelocity, isPlaying, isStopped, pause, play, setCone, setDirection, setEAXProperty, setGain, setLooping, setMinMaxDistances, setPitch, setPos, setSourceRelativeMode, setStaticBuffer, setVelocity, sourceName, and stop. |
The documentation for this class was generated from the following files:
|
|