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