orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
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

◆ orxSOUND_KZ_LOCALE_GROUP

#define orxSOUND_KZ_LOCALE_GROUP   "Sound"

Definition at line 55 of file orxSound.h.

◆ orxSOUND_KZ_MASTER_BUS

#define orxSOUND_KZ_MASTER_BUS   "master"

Definition at line 57 of file orxSound.h.

◆ orxSOUND_KZ_RESOURCE_GROUP

#define orxSOUND_KZ_RESOURCE_GROUP   "Sound"

Misc defines

Definition at line 54 of file orxSound.h.

Typedef Documentation

◆ orxSOUND

typedef struct __orxSOUND_t orxSOUND

Internal Sound structures

Definition at line 77 of file orxSound.h.

◆ orxSOUND_SAMPLE

typedef struct __orxSOUND_SAMPLE_t orxSOUND_SAMPLE

Definition at line 78 of file orxSound.h.

Enumeration Type Documentation

◆ orxSOUND_EVENT

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.

◆ orxSOUND_STATUS

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

◆ orxSound_AddBusFilter()

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

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

◆ orxSound_AddBusFilterFromConfig()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddBusFilterFromConfig ( orxSTRINGID _stBusID,
const orxSTRING _zFilterConfigID )
extern

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

◆ orxSound_AddFilter()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilter ( orxSOUND * _pstSound,
const orxSOUND_FILTER_DATA * _pstFilterData,
orxBOOL _bUseCustomParam )
extern

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

◆ orxSound_AddFilterFromConfig()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_AddFilterFromConfig ( orxSOUND * _pstSound,
const orxSTRING _zFilterConfigID )
extern

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

◆ orxSound_ClearCache()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_ClearCache ( )
extern

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

◆ orxSound_Create()

orxDLLAPI orxSOUND *orxFASTCALL orxSound_Create ( )
extern

Creates an empty sound

Returns
Created orxSOUND / orxNULL

◆ orxSound_CreateFromConfig()

orxDLLAPI orxSOUND *orxFASTCALL orxSound_CreateFromConfig ( const orxSTRING _zConfigID)
extern

Creates sound from config

Parameters
[in]_zConfigIDConfig ID @ return orxSOUND / orxNULL

◆ orxSound_CreateSample()

orxDLLAPI orxSOUND_SAMPLE *orxFASTCALL orxSound_CreateSample ( orxU32 _u32ChannelNumber,
orxU32 _u32FrameNumber,
orxU32 _u32SampleRate,
const orxSTRING _zName )
extern

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

◆ orxSound_CreateWithEmptyStream()

orxDLLAPI orxSOUND *orxFASTCALL orxSound_CreateWithEmptyStream ( orxU32 _u32ChannelNumber,
orxU32 _u32SampleRate,
const orxSTRING _zName )
extern

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

◆ orxSound_Delete()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Delete ( orxSOUND * _pstSound)
extern

Deletes sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_DeleteSample()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_DeleteSample ( orxSOUND_SAMPLE * _pstSample)
extern

Deletes a sample

Parameters
[in]_pstSampleConcerned sample
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_Exit()

orxDLLAPI void orxFASTCALL orxSound_Exit ( )
extern

Exits from the sound module

◆ orxSound_GetBusChild()

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusChild ( orxSTRINGID _stBusID)
extern

Gets bus child

Parameters
[in]_stBusIDConcerned bus ID
Returns
Child bus ID / orxSTRINGID_UNDEFINED

◆ orxSound_GetBusGlobalPitch()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalPitch ( orxSTRINGID _stBusID)
extern

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

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT

◆ orxSound_GetBusGlobalVolume()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusGlobalVolume ( orxSTRINGID _stBusID)
extern

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

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT

◆ orxSound_GetBusID()

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusID ( const orxSOUND * _pstSound)
extern

Gets sound's bus ID

Parameters
[in]_pstSoundConcerned sound
Returns
Sound's bus ID

◆ orxSound_GetBusParent()

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusParent ( orxSTRINGID _stBusID)
extern

Gets bus parent

Parameters
[in]_stBusIDConcerned bus ID
Returns
Parent bus ID / orxSTRINGID_UNDEFINED

◆ orxSound_GetBusPitch()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusPitch ( orxSTRINGID _stBusID)
extern

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

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT

◆ orxSound_GetBusSibling()

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetBusSibling ( orxSTRINGID _stBusID)
extern

Gets bus sibling

Parameters
[in]_stBusIDConcerned bus ID
Returns
Sibling bus ID / orxSTRINGID_UNDEFINED

◆ orxSound_GetBusVolume()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetBusVolume ( orxSTRINGID _stBusID)
extern

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

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxFLOAT

◆ orxSound_GetDuration()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetDuration ( const orxSOUND * _pstSound)
extern

Gets sound duration

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT

◆ orxSound_GetMasterBusID()

orxDLLAPI orxSTRINGID orxFASTCALL orxSound_GetMasterBusID ( )
extern

Gets master bus ID

Returns
Master bus ID

◆ orxSound_GetName()

orxDLLAPI const orxSTRING orxFASTCALL orxSound_GetName ( const orxSOUND * _pstSound)
extern

Gets sound config name

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTRING / orxSTRING_EMPTY

◆ orxSound_GetNext()

orxDLLAPI orxSOUND *orxFASTCALL orxSound_GetNext ( const orxSOUND * _pstSound,
orxSTRINGID _stBusID )
extern

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

◆ orxSound_GetPanning()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetPanning ( const orxSOUND * _pstSound,
orxFLOAT * _pfPanning,
orxBOOL * _pbMix )
extern

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

◆ orxSound_GetPitch()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetPitch ( const orxSOUND * _pstSound)
extern

Gets sound pitch

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT

◆ orxSound_GetPosition()

orxDLLAPI orxVECTOR *orxFASTCALL orxSound_GetPosition ( const orxSOUND * _pstSound,
orxVECTOR * _pvPosition )
extern

Gets sound position

Parameters
[in]_pstSoundConcerned Sound
[out]_pvPositionSound's position
Returns
orxVECTOR / orxNULL

◆ orxSound_GetSampleInfo()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSampleInfo ( const orxSOUND_SAMPLE * _pstSample,
orxU32 * _pu32ChannelNumber,
orxU32 * _pu32FrameNumber,
orxU32 * _pu32SampleRate )
extern

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

◆ orxSound_GetSpatialization()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_GetSpatialization ( const orxSOUND * _pstSound,
orxFLOAT * _pfMinDistance,
orxFLOAT * _pfMaxDistance,
orxFLOAT * _pfMinGain,
orxFLOAT * _pfMaxGain,
orxFLOAT * _pfRollOff )
extern

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

◆ orxSound_GetStatus()

orxDLLAPI orxSOUND_STATUS orxFASTCALL orxSound_GetStatus ( const orxSOUND * _pstSound)
extern

Gets sound status

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSOUND_STATUS

◆ orxSound_GetTime()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetTime ( const orxSOUND * _pstSound)
extern

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

Parameters
[in]_pstSoundConcerned sound
Returns
Sound's time (cursor/play position), in seconds

◆ orxSound_GetVolume()

orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetVolume ( const orxSOUND * _pstSound)
extern

Gets sound volume

Parameters
[in]_pstSoundConcerned Sound
Returns
orxFLOAT

◆ orxSound_HasRecordingSupport()

orxDLLAPI orxBOOL orxFASTCALL orxSound_HasRecordingSupport ( )
extern

Is recording possible on the current system?

Returns
orxTRUE / orxFALSE

◆ orxSound_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Init ( )
extern

Initializes the sound module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_IsLooping()

orxDLLAPI orxBOOL orxFASTCALL orxSound_IsLooping ( const orxSOUND * _pstSound)
extern

Is sound looping?

Parameters
[in]_pstSoundConcerned Sound
Returns
orxTRUE / orxFALSE

◆ orxSound_IsStream()

orxDLLAPI orxBOOL orxFASTCALL orxSound_IsStream ( orxSOUND * _pstSound)
extern

Is a stream (ie. music)?

Parameters
[in]_pstSoundConcerned Sound
Returns
orxTRUE / orxFALSE

◆ orxSound_LinkSample()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_LinkSample ( orxSOUND * _pstSound,
const orxSTRING _zSampleName )
extern

Links a sample

Parameters
[in]_pstSoundConcerned sound
[in]_zSampleNameName of the sample to link (must already be loaded/created)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_Loop()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Loop ( orxSOUND * _pstSound,
orxBOOL _bLoop )
extern

Loops sound

Parameters
[in]_pstSoundConcerned Sound
[in]_bLooporxTRUE / orxFALSE
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_Pause()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Pause ( orxSOUND * _pstSound)
extern

Pauses sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_Play()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Play ( orxSOUND * _pstSound)
extern

Plays sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_RemoveAllBusFilters()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllBusFilters ( orxSTRINGID _stBusID)
extern

Removes all filters from a bus

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_RemoveAllFilters()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveAllFilters ( orxSOUND * _pstSound)
extern

Removes all filters from a sound

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_RemoveLastBusFilter()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastBusFilter ( orxSTRINGID _stBusID)
extern

Removes last added filter from a bus

Parameters
[in]_stBusIDConcerned bus ID
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_RemoveLastFilter()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_RemoveLastFilter ( orxSOUND * _pstSound)
extern

Removes last added filter from a sound

Parameters
[in]_pstSoundConcerned sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_SetBusID()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusID ( orxSOUND * _pstSound,
orxSTRINGID _stBusID )
extern

Sets sound's bus ID

Parameters
[in]_pstSoundConcerned sound
[in]_stBusIDBus ID to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_SetBusParent()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusParent ( orxSTRINGID _stBusID,
orxSTRINGID _stParentBusID )
extern

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

◆ orxSound_SetBusPitch()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusPitch ( orxSTRINGID _stBusID,
orxFLOAT _fPitch )
extern

Sets bus pitch

Parameters
[in]_stBusIDConcerned bus ID, will create it if not already existing
[in]_fPitchDesired pitch (< 1.0 => lower pitch, = 1.0 => original pitch, > 1.0 => higher pitch). 0.0 is ignored.
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_SetBusVolume()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetBusVolume ( orxSTRINGID _stBusID,
orxFLOAT _fVolume )
extern

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

◆ orxSound_SetPanning()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPanning ( orxSOUND * _pstSound,
orxFLOAT _fPanning,
orxBOOL _bMix )
extern

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

◆ orxSound_SetPitch()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPitch ( orxSOUND * _pstSound,
orxFLOAT _fPitch )
extern

Sets sound pitch

Parameters
[in]_pstSoundConcerned Sound
[in]_fPitchDesired pitch (< 1.0 => lower pitch, = 1.0 => original pitch, > 1.0 => higher pitch). 0.0 is ignored.
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_SetPosition()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPosition ( orxSOUND * _pstSound,
const orxVECTOR * _pvPosition )
extern

Sets sound position

Parameters
[in]_pstSoundConcerned Sound
[in]_pvPositionDesired position
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_SetSampleData()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSampleData ( orxSOUND_SAMPLE * _pstSample,
const orxFLOAT * _afData,
orxU32 _u32SampleNumber )
extern

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

◆ orxSound_SetSpatialization()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetSpatialization ( orxSOUND * _pstSound,
orxFLOAT _fMinDistance,
orxFLOAT _fMaxDistance,
orxFLOAT _fMinGain,
orxFLOAT _fMaxGain,
orxFLOAT _fRollOff )
extern

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

◆ orxSound_SetTime()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetTime ( orxSOUND * _pstSound,
orxFLOAT _fTime )
extern

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

Parameters
[in]_pstSoundConcerned sound
[in]_fTimeTime, in seconds
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_Setup()

orxDLLAPI void orxFASTCALL orxSound_Setup ( )
extern

Sound module setup

◆ orxSound_SetVolume()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetVolume ( orxSOUND * _pstSound,
orxFLOAT _fVolume )
extern

Sets sound volume

Parameters
[in]_pstSoundConcerned Sound
[in]_fVolumeDesired volume (0.0 - 1.0)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_StartRecording()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_StartRecording ( const orxCHAR * _zName,
orxBOOL _bWriteToFile,
orxU32 _u32SampleRate,
orxU32 _u32ChannelNumber )
extern

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

◆ orxSound_Stop()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_Stop ( orxSOUND * _pstSound)
extern

Stops sound

Parameters
[in]_pstSoundConcerned Sound
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_StopRecording()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_StopRecording ( )
extern

Stops recording

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxSound_UnlinkSample()

orxDLLAPI orxSTATUS orxFASTCALL orxSound_UnlinkSample ( orxSOUND * _pstSound)
extern

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