139 bool setGain(
const float a_gain);
157 bool setLoop(
const bool a_loop);
Implements an audio Buffer.
This class implements an audio buffer.
Definition CAudioBuffer.h:79
This class implements an audio source.
Definition CAudioSource.h:79
bool rewind()
This method rewinds the audio source.
Definition CAudioSource.cpp:189
bool play()
This method plays the audio buffer.
Definition CAudioSource.cpp:116
float getPitch()
This method returns the audio pitch value.
Definition CAudioSource.h:136
float getPosTime()
This method returns the current playing position on audio buffer.
Definition CAudioSource.cpp:226
bool checkError()
This method checks for any OpenAL errors.
Definition CAudioSource.cpp:411
virtual ~cAudioSource()
Destructor of cAudioSource.
Definition CAudioSource.cpp:81
bool setGain(const float a_gain)
This method sets the audio gain value. Set value to 0.0 to disable sound.
Definition CAudioSource.cpp:309
short getSampleLeft(double a_time)
Definition CAudioSource.cpp:243
unsigned int m_source
OpenAL audio source ID.
Definition CAudioSource.h:180
float m_pitch
Audio pitch value.
Definition CAudioSource.h:183
bool setSourcePos(const cVector3d a_sourcePos)
This method sets the position of the audio source in world coordinates.
Definition CAudioSource.cpp:331
cVector3d getSourcePos()
This method returns the position of the audio source in world coordinates.
Definition CAudioSource.h:148
cAudioSource()
Constructor of cAudioSource.
Definition CAudioSource.cpp:60
float getGain()
This method returns the audio gain value.
Definition CAudioSource.h:142
cVector3d m_sourcePos
Position of source in world coordinates.
Definition CAudioSource.h:189
cAudioBuffer * getAudioBuffer()
This method returns the audio buffer.
Definition CAudioSource.h:103
float m_gain
Audio gain value.
Definition CAudioSource.h:186
bool stop()
This method stops the audio source from playing.
Definition CAudioSource.cpp:172
bool m_loop
Loop playing mode.
Definition CAudioSource.h:195
bool pause()
This method pauses the audio source from playing.
Definition CAudioSource.cpp:155
bool setSourceVel(const cVector3d a_sourceVel)
This method sets the velocity of the audio source in world coordinates.
Definition CAudioSource.cpp:357
bool getLoop()
This method returns the status of loop playing.
Definition CAudioSource.h:160
bool setAudioBuffer(cAudioBuffer *a_audioBuffer)
This method sets the audio buffer.
Definition CAudioSource.cpp:98
cVector3d getSourceVel()
This method returns the velocity of the audio source in world coordinates.
Definition CAudioSource.h:154
bool setPitch(const float a_pitch)
This method sets the audio pitch. The default value is 1.0.
Definition CAudioSource.cpp:287
bool setLoop(const bool a_loop)
This method enables or disables loop playing.
Definition CAudioSource.cpp:384
cVector3d m_sourceVel
Velocity of source in world coordinates.
Definition CAudioSource.h:192
bool setPosTime(const float a_time)
This method set the current playing position of the audio buffer.
Definition CAudioSource.cpp:209
cAudioBuffer * m_audioBuffer
Audio buffer.
Definition CAudioSource.h:198
bool isPlaying()
This method returns true if the audio source is currently playing, false otherwise.
Definition CAudioSource.cpp:133
short getSampleRight(double a_time)
Definition CAudioSource.cpp:265
Definition CAudioBuffer.cpp:57
This class implements a 3D vector.
Definition CVector3d.h:89