orx  1.14
Portable Game Engine
OrxSound

Data Structures

struct  orxSOUND_EVENT_PAYLOAD
 
struct  orxSOUND_STREAM_INFO
 
struct  orxSOUND_STREAM_PACKET
 

Macros

#define orxSOUND_KZ_LOCALE_GROUP   "Sound"
 
#define orxSOUND_KZ_MASTER_BUS   "master"
 
#define orxSOUND_KZ_RESOURCE_GROUP   "Sound"
 

Typedefs

typedef struct __orxSOUND_t orxSOUND
 
typedef struct __orxSOUND_SAMPLE_t orxSOUND_SAMPLE
 

Enumerations

enum  orxSOUND_EVENT {
  orxSOUND_EVENT_START = 0, orxSOUND_EVENT_STOP, orxSOUND_EVENT_ADD, orxSOUND_EVENT_REMOVE,
  orxSOUND_EVENT_PACKET, orxSOUND_EVENT_RECORDING_START, orxSOUND_EVENT_RECORDING_STOP, orxSOUND_EVENT_RECORDING_PACKET,
  orxSOUND_EVENT_SET_FILTER_PARAM, orxSOUND_EVENT_NUMBER, orxSOUND_EVENT_NONE = orxENUM_NONE
}
 
enum  orxSOUND_STATUS {
  orxSOUND_STATUS_PLAY = 0, orxSOUND_STATUS_PAUSE, orxSOUND_STATUS_STOP, orxSOUND_STATUS_NUMBER,
  orxSOUND_STATUS_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddBusFilter (orxSTRINGID _stBusID, const orxSOUND_FILTER_DATA *_pstFilterData, orxBOOL _bUseCustomParam)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddBusFilterFromConfig (orxSTRINGID _stBusID, const orxSTRING _zFilterConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilter (orxSOUND *_pstSound, const orxSOUND_FILTER_DATA *_pstFilterData, orxBOOL _bUseCustomParam)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilterFromConfig (orxSOUND *_pstSound, const orxSTRING _zFilterConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_ClearCache ()
 
orxDLLAPI orxSOUND *orxFASTCALL orxSound_Create ()
 
orxDLLAPI orxSOUND *orxFASTCALL orxSound_CreateFromConfig (const orxSTRING _zConfigID)
 
orxDLLAPI orxSOUND_SAMPLE *orxFASTCALL orxSound_CreateSample (orxU32 _u32ChannelNumber, orxU32 _u32FrameNumber, orxU32 _u32SampleRate, const orxSTRING _zName)
 
orxDLLAPI orxSOUND *orxFASTCALL orxSound_CreateWithEmptyStream (orxU32 _u32ChannelNumber, orxU32 _u32SampleRate, const orxSTRING _zName)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Delete (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_DeleteSample (orxSOUND_SAMPLE *_pstSample)
 
orxDLLAPI void orxFASTCALL orxSound_Exit ()
 
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusChild (orxSTRINGID _stBusID)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalPitch (orxSTRINGID _stBusID)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalVolume (orxSTRINGID _stBusID)
 
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusID (const orxSOUND *_pstSound)
 
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusParent (orxSTRINGID _stBusID)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusPitch (orxSTRINGID _stBusID)
 
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusSibling (orxSTRINGID _stBusID)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusVolume (orxSTRINGID _stBusID)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetDuration (const orxSOUND *_pstSound)
 
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetMasterBusID ()
 
orxDLLAPI const orxSTRING orxFASTCALL orxSound_GetName (const orxSOUND *_pstSound)
 
orxDLLAPI orxSOUND *orxFASTCALL orxSound_GetNext (const orxSOUND *_pstSound, orxSTRINGID _stBusID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetPanning (const orxSOUND *_pstSound, orxFLOAT *_pfPanning, orxBOOL *_pbMix)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetPitch (const orxSOUND *_pstSound)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxSound_GetPosition (const orxSOUND *_pstSound, orxVECTOR *_pvPosition)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSampleInfo (const orxSOUND_SAMPLE *_pstSample, orxU32 *_pu32ChannelNumber, orxU32 *_pu32FrameNumber, orxU32 *_pu32SampleRate)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSpatialization (const orxSOUND *_pstSound, orxFLOAT *_pfMinDistance, orxFLOAT *_pfMaxDistance, orxFLOAT *_pfMinGain, orxFLOAT *_pfMaxGain, orxFLOAT *_pfRollOff)
 
orxDLLAPI orxSOUND_STATUS orxFASTCALL orxSound_GetStatus (const orxSOUND *_pstSound)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetTime (const orxSOUND *_pstSound)
 
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetVolume (const orxSOUND *_pstSound)
 
orxDLLAPI orxBOOL orxFASTCALL orxSound_HasRecordingSupport ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxSound_IsLooping (const orxSOUND *_pstSound)
 
orxDLLAPI orxBOOL orxFASTCALL orxSound_IsStream (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_LinkSample (orxSOUND *_pstSound, const orxSTRING _zSampleName)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Loop (orxSOUND *_pstSound, orxBOOL _bLoop)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Pause (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Play (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllBusFilters (orxSTRINGID _stBusID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllFilters (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastBusFilter (orxSTRINGID _stBusID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastFilter (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusID (orxSOUND *_pstSound, orxSTRINGID _stBusID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusParent (orxSTRINGID _stBusID, orxSTRINGID _stParentBusID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusPitch (orxSTRINGID _stBusID, orxFLOAT _fPitch)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusVolume (orxSTRINGID _stBusID, orxFLOAT _fVolume)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPanning (orxSOUND *_pstSound, orxFLOAT _fPanning, orxBOOL _bMix)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPitch (orxSOUND *_pstSound, orxFLOAT _fPitch)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPosition (orxSOUND *_pstSound, const orxVECTOR *_pvPosition)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSampleData (orxSOUND_SAMPLE *_pstSample, const orxFLOAT *_afData, orxU32 _u32SampleNumber)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSpatialization (orxSOUND *_pstSound, orxFLOAT _fMinDistance, orxFLOAT _fMaxDistance, orxFLOAT _fMinGain, orxFLOAT _fMaxGain, orxFLOAT _fRollOff)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetTime (orxSOUND *_pstSound, orxFLOAT _fTime)
 
orxDLLAPI void orxFASTCALL orxSound_Setup ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetVolume (orxSOUND *_pstSound, orxFLOAT _fVolume)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_StartRecording (const orxCHAR *_zName, orxBOOL _bWriteToFile, orxU32 _u32SampleRate, orxU32 _u32ChannelNumber)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Stop (orxSOUND *_pstSound)
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_StopRecording ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxSound_UnlinkSample (orxSOUND *_pstSound)
 

Detailed Description

Sound module Module that handles sound

Macro Definition Documentation

#define orxSOUND_KZ_LOCALE_GROUP   "Sound"

Definition at line 55 of file orxSound.h.

#define orxSOUND_KZ_MASTER_BUS   "master"

Definition at line 57 of file orxSound.h.

#define orxSOUND_KZ_RESOURCE_GROUP   "Sound"

Misc defines

Definition at line 54 of file orxSound.h.

Typedef Documentation

typedef struct __orxSOUND_t orxSOUND

Internal Sound structures

Definition at line 77 of file orxSound.h.

typedef struct __orxSOUND_SAMPLE_t orxSOUND_SAMPLE

Definition at line 78 of file orxSound.h.

Enumeration Type Documentation

Event enum

Enumerator
orxSOUND_EVENT_START 

Event sent when a sound starts

orxSOUND_EVENT_STOP 

Event sent when a sound stops

orxSOUND_EVENT_ADD 

Event sent when a sound is added

orxSOUND_EVENT_REMOVE 

Event sent when a sound is removed

orxSOUND_EVENT_PACKET 

Event sent when a sound packet is streamed. IMPORTANT: this event can be sent from a worker thread, do not call any orx API when handling it

orxSOUND_EVENT_RECORDING_START 

Event sent when recording starts

orxSOUND_EVENT_RECORDING_STOP 

Event sent when recording stops

orxSOUND_EVENT_RECORDING_PACKET 

Event sent when a packet has been recorded

orxSOUND_EVENT_SET_FILTER_PARAM 

Event sent when setting a filter's parameter

orxSOUND_EVENT_NUMBER 
orxSOUND_EVENT_NONE 

Definition at line 83 of file orxSound.h.

Sound status enum

Enumerator
orxSOUND_STATUS_PLAY 
orxSOUND_STATUS_PAUSE 
orxSOUND_STATUS_STOP 
orxSOUND_STATUS_NUMBER 
orxSOUND_STATUS_NONE 

Definition at line 62 of file orxSound.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddBusFilter ( orxSTRINGID  _stBusID,
const orxSOUND_FILTER_DATA _pstFilterData,
orxBOOL  _bUseCustomParam 
)

Adds a filter to a bus (cascading)

Parameters
[in]_stBusIDConcerned bus ID
[in]_pstFilterDataConcerned filter data
[in]_bUseCustomParamFilter uses custom parameters
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddBusFilterFromConfig ( orxSTRINGID  _stBusID,
const orxSTRING  _zFilterConfigID 
)

Adds a filter to a bus (cascading) from config

Parameters
[in]_stBusIDConcerned bus ID
[in]_zFilterConfigIDConfig ID of the filter to add
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilter ( orxSOUND _pstSound,
const orxSOUND_FILTER_DATA _pstFilterData,
orxBOOL  _bUseCustomParam 
)

Adds a filter to a sound (cascading)

Parameters
[in]_pstSoundConcerned sound
[in]_pstFilterDataConcerned filter data
[in]_bUseCustomParamFilter uses custom parameters
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilterFromConfig ( orxSOUND _pstSound,
const orxSTRING  _zFilterConfigID 
)

Adds a filter to a sound (cascading) from config

Parameters
[in]_pstSoundConcerned sound
[in]_zFilterConfigIDConfig ID of the filter to add
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_ClearCache ( )

Clears cache (if any sound sample is still in active use, it'll remain in memory until not referenced anymore)

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSOUND* orxFASTCALL orxSound_Create ( )

Creates an empty sound

Returns
Created orxSOUND / orxNULL
orxDLLAPI orxSOUND* orxFASTCALL orxSound_CreateFromConfig ( const orxSTRING  _zConfigID)

Creates sound from config

Parameters
[in]_zConfigIDConfig ID @ return orxSOUND / orxNULL
orxDLLAPI orxSOUND_SAMPLE* orxFASTCALL orxSound_CreateSample ( orxU32  _u32ChannelNumber,
orxU32  _u32FrameNumber,
orxU32  _u32SampleRate,
const orxSTRING  _zName 
)

Creates a sample

Parameters
[in]_u32ChannelNumberNumber of channels of the sample
[in]_u32FrameNumberNumber of frame of the sample (number of "samples" = number of frames * number of channels)
[in]_u32SampleRateSampling rate of the sample (ie. number of frames per second)
[in]_zNameName to associate with the sample
Returns
orxSOUND_SAMPLE / orxNULL
orxDLLAPI orxSOUND* orxFASTCALL orxSound_CreateWithEmptyStream ( orxU32  _u32ChannelNumber,
orxU32  _u32SampleRate,
const orxSTRING  _zName 
)

Creates a sound with an empty stream (ie. you'll need to provide actual sound data for each packet sent to the sound card using the event system)

Parameters
[in]_u32ChannelNumberNumber of channels of the stream
[in]_u32SampleRateSampling rate of the stream (ie. number of frames per second)
[in]_zNameName to associate with this sound
Returns
orxSOUND / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Delete ( orxSOUND _pstSound)

Deletes sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_DeleteSample ( orxSOUND_SAMPLE _pstSample)

Deletes a sample

Parameters
[in]_pstSampleConcerned sample
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxSound_Exit ( )

Exits from the sound module

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusChild ( orxSTRINGID  _stBusID)

Gets bus child

Parameters
[in]_stBusIDConcerned bus ID
Returns
Child bus ID / orxSTRINGID_UNDEFINED
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalPitch ( orxSTRINGID  _stBusID)

Gets bus global pitch, ie. taking into account the whole bus hierarchy

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalVolume ( orxSTRINGID  _stBusID)

Gets bus global volume, ie. taking into account the whole bus hierarchy

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusID ( const orxSOUND _pstSound)

Gets sound's bus ID

Parameters
[in]_pstSoundConcerned sound
Returns
Sound's bus ID
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusParent ( orxSTRINGID  _stBusID)

Gets bus parent

Parameters
[in]_stBusIDConcerned bus ID
Returns
Parent bus ID / orxSTRINGID_UNDEFINED
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusPitch ( orxSTRINGID  _stBusID)

Gets bus pitch (local, ie. unaffected by the whole bus hierarchy)

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusSibling ( orxSTRINGID  _stBusID)

Gets bus sibling

Parameters
[in]_stBusIDConcerned bus ID
Returns
Sibling bus ID / orxSTRINGID_UNDEFINED
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusVolume ( orxSTRINGID  _stBusID)

Gets bus volume (local, ie. unaffected by the whole bus hierarchy)

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetDuration ( const orxSOUND _pstSound)

Gets sound duration

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT
orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetMasterBusID ( )

Gets master bus ID

Returns
Master bus ID
orxDLLAPI const orxSTRING orxFASTCALL orxSound_GetName ( const orxSOUND _pstSound)

Gets sound config name

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTRING / orxSTRING_EMPTY
orxDLLAPI orxSOUND* orxFASTCALL orxSound_GetNext ( const orxSOUND _pstSound,
orxSTRINGID  _stBusID 
)

Gets next sound in bus

Parameters
[in]_pstSoundConcerned sound, orxNULL to get the first one
[in]_stBusIDBus ID to consider, orxSTRINGID_UNDEFINED for all
Returns
orxSOUND / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetPanning ( const orxSOUND _pstSound,
orxFLOAT *  _pfPanning,
orxBOOL *  _pbMix 
)

Gets a sound panning

Parameters
[in]_pstSoundConcerned Sound
[out]_pfPanningSound panning, -1.0f for full left, 0.0f for center, 1.0f for full right
[out]_pbMixLeft/Right channels are be mixed if orxTRUE or act like a balance otherwise
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetPitch ( const orxSOUND _pstSound)

Gets sound pitch

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT
orxDLLAPI orxVECTOR* orxFASTCALL orxSound_GetPosition ( const orxSOUND _pstSound,
orxVECTOR _pvPosition 
)

Gets sound position

Parameters
[in]_pstSoundConcerned Sound
[out]_pvPositionSound's position
Returns
orxVECTOR / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSampleInfo ( const orxSOUND_SAMPLE _pstSample,
orxU32 *  _pu32ChannelNumber,
orxU32 *  _pu32FrameNumber,
orxU32 *  _pu32SampleRate 
)

Gets sample info

Parameters
[in]_pstSampleConcerned sample
[in]_pu32ChannelNumberNumber of channels of the sample
[in]_pu32FrameNumberNumber of frame of the sample (number of "samples" = number of frames * number of channels)
[in]_pu32SampleRateSampling rate of the sample (ie. number of frames per second)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSpatialization ( const orxSOUND _pstSound,
orxFLOAT *  _pfMinDistance,
orxFLOAT *  _pfMaxDistance,
orxFLOAT *  _pfMinGain,
orxFLOAT *  _pfMaxGain,
orxFLOAT *  _pfRollOff 
)

Gets a sound spatialization information

Parameters
[in]_pstSoundConcerned Sound
[out]_pfMinDistanceMin distance, inside which the max gain will be used, will be strictly negative if the sound isn't spatialized
[out]_pfMaxDistanceMax distance, outside which the gain will stop decreasing, will be strictly negative if the sound isn't spatialized
[out]_pfMinGainMin gain in [0.0f - 1.0f]
[out]_pfMaxGainMax gain in [0.0f - 1.0f]
[out]_pfRollOffRollOff factor applied when interpolating the gain between inner and outer distances, defaults to 1.0f
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSOUND_STATUS orxFASTCALL orxSound_GetStatus ( const orxSOUND _pstSound)

Gets sound status

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSOUND_STATUS
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetTime ( const orxSOUND _pstSound)

Gets a sound's time (ie. cursor/play position from beginning)

Parameters
[in]_pstSoundConcerned sound
Returns
Sound's time (cursor/play position), in seconds
orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetVolume ( const orxSOUND _pstSound)

Gets sound volume

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT
orxDLLAPI orxBOOL orxFASTCALL orxSound_HasRecordingSupport ( )

Is recording possible on the current system?

Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Init ( )

Initializes the sound module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxSound_IsLooping ( const orxSOUND _pstSound)

Is sound looping?

Parameters
[in]_pstSoundConcerned Sound
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxSound_IsStream ( orxSOUND _pstSound)

Is a stream (ie. music)?

Parameters
[in]_pstSoundConcerned Sound
Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_LinkSample ( orxSOUND _pstSound,
const orxSTRING  _zSampleName 
)

Links a sample

Parameters
[in]_pstSoundConcerned sound
[in]_zSampleNameName of the sample to link (must already be loaded/created)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Loop ( orxSOUND _pstSound,
orxBOOL  _bLoop 
)

Loops sound

Parameters
[in]_pstSoundConcerned Sound
[in]_bLooporxTRUE / orxFALSE
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Pause ( orxSOUND _pstSound)

Pauses sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Play ( orxSOUND _pstSound)

Plays sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllBusFilters ( orxSTRINGID  _stBusID)

Removes all filters from a bus

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllFilters ( orxSOUND _pstSound)

Removes all filters from a sound

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastBusFilter ( orxSTRINGID  _stBusID)

Removes last added filter from a bus

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastFilter ( orxSOUND _pstSound)

Removes last added filter from a sound

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusID ( orxSOUND _pstSound,
orxSTRINGID  _stBusID 
)

Sets sound's bus ID

Parameters
[in]_pstSoundConcerned sound
[in]_stBusIDBus ID to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusParent ( orxSTRINGID  _stBusID,
orxSTRINGID  _stParentBusID 
)

Sets a bus parent

Parameters
[in]_stBusIDConcerned bus ID, will create it if not already existing
[in]_stParentBusIDID of the bus to use as parent, will create it if not already existing
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusPitch ( orxSTRINGID  _stBusID,
orxFLOAT  _fPitch 
)

Sets bus pitch

Parameters
[in]_stBusIDConcerned bus ID, will create it if not already existing
[in]_fPitchDesired pitch
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusVolume ( orxSTRINGID  _stBusID,
orxFLOAT  _fVolume 
)

Sets bus volume

Parameters
[in]_stBusIDConcerned bus ID, will create it if not already existing
[in]_fVolumeDesired volume (0.0 - 1.0)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPanning ( orxSOUND _pstSound,
orxFLOAT  _fPanning,
orxBOOL  _bMix 
)

Sets a sound panning

Parameters
[in]_pstSoundpanning
[in]_fPanningSound panning, -1.0f for full left, 0.0f for center, 1.0f for full right
[in]_bMixLeft/Right channels will be mixed if orxTRUE or act like a balance otherwise
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPitch ( orxSOUND _pstSound,
orxFLOAT  _fPitch 
)

Sets sound pitch

Parameters
[in]_pstSoundConcerned Sound
[in]_fPitchDesired pitch
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPosition ( orxSOUND _pstSound,
const orxVECTOR _pvPosition 
)

Sets sound position

Parameters
[in]_pstSoundConcerned Sound
[in]_pvPositionDesired position
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSampleData ( orxSOUND_SAMPLE _pstSample,
const orxFLOAT *  _afData,
orxU32  _u32SampleNumber 
)

Sets sample data

Parameters
[in]_pstSampleConcerned sample
[in]_afDataData to set (samples are expected to be signed/normalized)
[in]_u32SampleNumberNumber of samples in the data array
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSpatialization ( orxSOUND _pstSound,
orxFLOAT  _fMinDistance,
orxFLOAT  _fMaxDistance,
orxFLOAT  _fMinGain,
orxFLOAT  _fMaxGain,
orxFLOAT  _fRollOff 
)

Sets a sound spatialization, with gain decreasing between the minimum and maximum distances, when enabled

Parameters
[in]_pstSoundConcerned Sound
[in]_fMinDistanceMin distance, inside which the max gain will be used, strictly negative value to disable spatialization entirely
[in]_fMaxDistanceMax distance, outside which the gain will stop decreasing, strictly negative value to disable spatialization entirely
[in]_fMinGainMin gain in [0.0f - 1.0f]
[in]_fMaxGainMax gain in [0.0f - 1.0f]
[in]_fRollOffRollOff factor applied when interpolating the gain between inner and outer distances, defaults to 1.0f
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetTime ( orxSOUND _pstSound,
orxFLOAT  _fTime 
)

Sets a sound time (ie. cursor/play position from beginning)

Parameters
[in]_pstSoundConcerned sound
[in]_fTimeTime, in seconds
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxSound_Setup ( )

Sound module setup

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetVolume ( orxSOUND _pstSound,
orxFLOAT  _fVolume 
)

Sets sound volume

Parameters
[in]_pstSoundConcerned Sound
[in]_fVolumeDesired volume (0.0 - 1.0)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_StartRecording ( const orxCHAR *  _zName,
orxBOOL  _bWriteToFile,
orxU32  _u32SampleRate,
orxU32  _u32ChannelNumber 
)

Starts recording

Parameters
[in]_zNameName for the recorded sound/file
[in]_bWriteToFileShould write to file?
[in]_u32SampleRateSample rate, 0 for default rate (48000Hz)
[in]_u32ChannelNumberChannel number, 0 for default mono channel
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_Stop ( orxSOUND _pstSound)

Stops sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_StopRecording ( )

Stops recording

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSound_UnlinkSample ( orxSOUND _pstSound)

Unlinks (and deletes if not used anymore) a sample

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.8.11