igor::iAudio Class Reference

#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 iAudiogetInstance ()
 
static IGOR_INLINE bool isInstantiated ()
 
static void create ()
 
static void destroy ()
 
- Protected Member Functions inherited from igor::iModule< iAudio >
 iModule ()=default
 
virtual ~iModule ()=default
 

Detailed Description

represents the audio interface

in this case wrapping OpenAL

Member Function Documentation

◆ bindSource()

void igor::iAudio::bindSource ( const iAudioSource source,
iSoundPtr  sound 
)

binds source to sound

Parameters
sourcethe given source
soundthe given sound resource

◆ createBuffer()

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

Parameters
[out]audioBufferthe returned audio buffer
numChannelsnumber of audio channels
bitsPerSamplebits per sample
sampleRatesample rate
bufferthe audio data
bufferSizesize of audio data
Returns
true if successful

◆ createSource()

bool igor::iAudio::createSource ( iAudioSource audioSource)

creates an audio source

Parameters
[out]audioSourcethe created audio source
Returns
true if successful

◆ destroyBuffer()

void igor::iAudio::destroyBuffer ( const iAudioBuffer buffer)

destroys given audio buffer

Parameters
bufferthe audio buffer to destroy

◆ destroySource()

void igor::iAudio::destroySource ( const iAudioSource audioSource)

destroys given audio source

Parameters
audioSourcegiven audio source

◆ playSource()

void igor::iAudio::playSource ( const iAudioSource audioSource)

starts playback of source

Parameters
audioSourcegiven source

◆ setSourceGain()

void igor::iAudio::setSourceGain ( const iAudioSource audioSource,
float32  gain 
)

sets audio source gain

Parameters
gainthe given gain

◆ setSourceLoop()

void igor::iAudio::setSourceLoop ( const iAudioSource audioSource,
bool  loop 
)

sets audio source loop mode

Parameters
loopif true loop mode is on

◆ setSourcePitch()

void igor::iAudio::setSourcePitch ( const iAudioSource audioSource,
float32  pitch 
)

sets audio source pitch

Parameters
pitchthe given pitch

◆ stopSource()

void igor::iAudio::stopSource ( const iAudioSource audioSource)

stops playback of source

Parameters
audioSourcegiven source

◆ updateListener()

void igor::iAudio::updateListener ( const iaMatrixd matrix,
const iaVector3d  velocity 
)

updates the listeners position, orientation and velocity

Parameters
matrixthe given matrix
velocitythe given velocity

◆ updateSource()

void igor::iAudio::updateSource ( const iAudioSource audioSource,
const iaVector3d position,
const iaVector3d  velocity 
)

updates position and velocoty of audio source

Parameters
audioSourcethe audio source to update
positionthe given position
velocitythe given velocity

Friends And Related Function Documentation

◆ iModule< iAudio >

friend class iModule< iAudio >
friend

The documentation for this class was generated from the following files: