0.44.0
|
#include <iAudio.h>
Inherits igor::iModule< iAudio >.
Public Member Functions | |
bool | createBuffer (iAudioBuffer &audioBuffer, int16 numChannels, int16 bitsPerSample, int32 sampleRate, const char *buffer, int32 bufferSize) |
void | destroyBuffer (const iAudioBuffer &buffer) |
bool | createSource (iAudioSource &audioSource) |
void | destroySource (const iAudioSource &audioSource) |
void | setSourcePitch (const iAudioSource &audioSource, float32 pitch) |
void | setSourceGain (const iAudioSource &audioSource, float32 gain) |
void | setSourceLoop (const iAudioSource &audioSource, bool loop) |
void | playSource (const iAudioSource &audioSource) |
void | stopSource (const iAudioSource &audioSource) |
void | updateSource (const iAudioSource &audioSource, const iaVector3d &position, const iaVector3d velocity) |
void | bindSource (const iAudioSource &source, iSoundPtr sound) |
void | updateListener (const iaMatrixd &matrix, const iaVector3d velocity) |
Friends | |
class | iModule< iAudio > |
Additional Inherited Members | |
Static Public Member Functions inherited from igor::iModule< iAudio > | |
static IGOR_INLINE iAudio & | getInstance () |
static IGOR_INLINE bool | isInstantiated () |
static void | create () |
static void | destroy () |
Protected Member Functions inherited from igor::iModule< iAudio > | |
iModule ()=default | |
virtual | ~iModule ()=default |
represents the audio interface
in this case wrapping OpenAL
void igor::iAudio::bindSource | ( | const iAudioSource & | source, |
iSoundPtr | sound | ||
) |
binds source to sound
source | the given source |
sound | the given sound resource |
bool igor::iAudio::createBuffer | ( | iAudioBuffer & | audioBuffer, |
int16 | numChannels, | ||
int16 | bitsPerSample, | ||
int32 | sampleRate, | ||
const char * | buffer, | ||
int32 | bufferSize | ||
) |
creates an audio buffer based on given parameters
[out] | audioBuffer | the returned audio buffer |
numChannels | number of audio channels | |
bitsPerSample | bits per sample | |
sampleRate | sample rate | |
buffer | the audio data | |
bufferSize | size of audio data |
bool igor::iAudio::createSource | ( | iAudioSource & | audioSource | ) |
creates an audio source
[out] | audioSource | the created audio source |
void igor::iAudio::destroyBuffer | ( | const iAudioBuffer & | buffer | ) |
destroys given audio buffer
buffer | the audio buffer to destroy |
void igor::iAudio::destroySource | ( | const iAudioSource & | audioSource | ) |
destroys given audio source
audioSource | given audio source |
void igor::iAudio::playSource | ( | const iAudioSource & | audioSource | ) |
starts playback of source
audioSource | given source |
void igor::iAudio::setSourceGain | ( | const iAudioSource & | audioSource, |
float32 | gain | ||
) |
sets audio source gain
gain | the given gain |
void igor::iAudio::setSourceLoop | ( | const iAudioSource & | audioSource, |
bool | loop | ||
) |
sets audio source loop mode
loop | if true loop mode is on |
void igor::iAudio::setSourcePitch | ( | const iAudioSource & | audioSource, |
float32 | pitch | ||
) |
sets audio source pitch
pitch | the given pitch |
void igor::iAudio::stopSource | ( | const iAudioSource & | audioSource | ) |
stops playback of source
audioSource | given source |
void igor::iAudio::updateListener | ( | const iaMatrixd & | matrix, |
const iaVector3d | velocity | ||
) |
updates the listeners position, orientation and velocity
matrix | the given matrix |
velocity | the given velocity |
void igor::iAudio::updateSource | ( | const iAudioSource & | audioSource, |
const iaVector3d & | position, | ||
const iaVector3d | velocity | ||
) |
updates position and velocoty of audio source
audioSource | the audio source to update |
position | the given position |
velocity | the given velocity |