orx
1.14
Portable Game Engine
|
Data Structures | |
struct | orxSOUND_FILTER_DATA |
Macros | |
#define | orxSOUNDSYSTEM_KZ_CONFIG_LISTENERS "Listeners" |
#define | orxSOUNDSYSTEM_KZ_CONFIG_MUTE_IN_BACKGROUND "MuteInBackground" |
#define | orxSOUNDSYSTEM_KZ_CONFIG_RATIO "DimensionRatio" |
#define | orxSOUNDSYSTEM_KZ_CONFIG_SECTION "SoundSystem" |
Typedefs | |
typedef void(orxFASTCALL * | orxSOUND_FILTER_FUNCTION) (orxFLOAT *_afSampleListOut, const orxFLOAT *_afSampleListIn, orxU32 _u32SampleCount, orxU32 _u32ChannelCount, orxU32 _u32SampleRate, orxSTRINGID _stNameID, void *_pContext) |
typedef struct __orxSOUNDSYSTEM_SAMPLE_t | orxSOUNDSYSTEM_SAMPLE |
typedef struct __orxSOUNDSYSTEM_SOUND_t | orxSOUNDSYSTEM_SOUND |
Sound system plugin module Plugin module that handles sound system
#define orxSOUNDSYSTEM_KZ_CONFIG_LISTENERS "Listeners" |
Definition at line 194 of file orxSoundSystem.h.
#define orxSOUNDSYSTEM_KZ_CONFIG_MUTE_IN_BACKGROUND "MuteInBackground" |
Definition at line 193 of file orxSoundSystem.h.
#define orxSOUNDSYSTEM_KZ_CONFIG_RATIO "DimensionRatio" |
Definition at line 192 of file orxSoundSystem.h.
#define orxSOUNDSYSTEM_KZ_CONFIG_SECTION "SoundSystem" |
Config defines
Definition at line 191 of file orxSoundSystem.h.
typedef void(orxFASTCALL * orxSOUND_FILTER_FUNCTION) (orxFLOAT *_afSampleListOut, const orxFLOAT *_afSampleListIn, orxU32 _u32SampleCount, orxU32 _u32ChannelCount, orxU32 _u32SampleRate, orxSTRINGID _stNameID, void *_pContext) |
Filter callback function type to use with custom filters
Definition at line 97 of file orxSoundSystem.h.
typedef struct __orxSOUNDSYSTEM_SAMPLE_t orxSOUNDSYSTEM_SAMPLE |
Definition at line 58 of file orxSoundSystem.h.
typedef struct __orxSOUNDSYSTEM_SOUND_t orxSOUNDSYSTEM_SOUND |
Abstract sound structures
Definition at line 57 of file orxSoundSystem.h.
enum orxSOUND_FILTER_TYPE |
Sound filter type enum
Definition at line 76 of file orxSoundSystem.h.
Sound system status enum
Enumerator | |
---|---|
orxSOUNDSYSTEM_STATUS_PLAY | |
orxSOUNDSYSTEM_STATUS_PAUSE | |
orxSOUNDSYSTEM_STATUS_STOP | |
orxSOUNDSYSTEM_STATUS_NUMBER | |
orxSOUNDSYSTEM_STATUS_NONE |
Definition at line 62 of file orxSoundSystem.h.
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_AddBusFilter | ( | orxHANDLE | _hBus, |
const orxSOUND_FILTER_DATA * | _pstFilterData, | ||
orxBOOL | _bUseCustomParam | ||
) |
Adds a filter to a bus (cascading)
[in] | _hBus | Concerned bus |
[in] | _pstFilterData | Concerned filter data |
[in] | _bUseCustomParam | Filter uses custom parameters |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_AddFilter | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
const orxSOUND_FILTER_DATA * | _pstFilterData, | ||
orxBOOL | _bUseCustomParam | ||
) |
Adds a filter to a sound (cascading)
[in] | _pstSound | Concerned sound |
[in] | _pstFilterData | Concerned filter data |
[in] | _bUseCustomParam | Filter uses custom parameters |
Creates a bus
[in] | _stBusID | Concerned bus ID |
orxDLLAPI orxSOUNDSYSTEM_SOUND* orxFASTCALL orxSoundSystem_CreateFromSample | ( | orxHANDLE | _hUserData, |
const orxSOUNDSYSTEM_SAMPLE * | _pstSample | ||
) |
Creates a sound from preloaded sample (can be played directly)
[in] | _hUserData | User data to associate with this sound |
[in] | _pstSample | Concerned sample |
orxDLLAPI orxSOUNDSYSTEM_SAMPLE* orxFASTCALL orxSoundSystem_CreateSample | ( | orxU32 | _u32ChannelNumber, |
orxU32 | _u32FrameNumber, | ||
orxU32 | _u32SampleRate | ||
) |
Creates an empty sample
[in] | _u32ChannelNumber | Number of channels of the sample |
[in] | _u32FrameNumber | Number of frame of the sample (number of "samples" = number of frames * number of channels) |
[in] | _u32SampleRate | Sampling rate of the sample (ie. number of frames per second) |
orxDLLAPI orxSOUNDSYSTEM_SOUND* orxFASTCALL orxSoundSystem_CreateStream | ( | orxHANDLE | _hUserData, |
orxU32 | _u32ChannelNumber, | ||
orxU32 | _u32SampleRate | ||
) |
Creates an empty stream
[in] | _hUserData | User data to associate with this sound |
[in] | _u32ChannelNumber | Number of channels for the stream |
[in] | _u32SampleRate | Sampling rate of the stream (ie. number of frames per second) |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Delete | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Deletes a sound
[in] | _pstSound | Concerned sound |
Deletes a bus
[in] | _hBus | Concerned bus |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_DeleteSample | ( | orxSOUNDSYSTEM_SAMPLE * | _pstSample | ) |
Deletes a sound sample
[in] | _pstSample | Concerned sample |
orxDLLAPI void orxFASTCALL orxSoundSystem_EnableListener | ( | orxU32 | _u32ListenerIndex, |
orxBOOL | _bEnable | ||
) |
Enables/disables a listener
[in] | _u32ListenerIndex | Concerned listener index |
[in] | _bEnable | Enable / disable |
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetDuration | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Gets a sound duration
[in] | _pstSound | Concerned sound |
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetGlobalVolume | ( | ) |
Gets global volume
orxDLLAPI orxU32 orxFASTCALL orxSoundSystem_GetListenerCount | ( | ) |
Gets listener count
orxDLLAPI orxVECTOR* orxFASTCALL orxSoundSystem_GetListenerPosition | ( | orxU32 | _u32Index, |
orxVECTOR * | _pvPosition | ||
) |
Gets listener position
[in] | _u32Index | Listener index, 0-based |
[out] | _pvPosition | Listener's position |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_GetPanning | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT * | _pfPanning, | ||
orxBOOL * | _pbMix | ||
) |
Gets a sound panning
[in] | _pstSound | Concerned Sound |
[out] | _pfPanning | Sound panning, -1.0f for full left, 0.0f for center, 1.0f for full right |
[out] | _pbMix | Left/Right channels are be mixed if orxTRUE or act like a balance otherwise |
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetPitch | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Gets a sound pitch
[in] | _pstSound | Concerned sound |
orxDLLAPI orxVECTOR* orxFASTCALL orxSoundSystem_GetPosition | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxVECTOR * | _pvPosition | ||
) |
Gets a sound position
[in] | _pstSound | Concerned sound |
[out] | _pvPosition | Position to get |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_GetSampleInfo | ( | const orxSOUNDSYSTEM_SAMPLE * | _pstSample, |
orxU32 * | _pu32ChannelNumber, | ||
orxU32 * | _pu32FrameNumber, | ||
orxU32 * | _pu32SampleRate | ||
) |
Gets sample info
[in] | _pstSample | Concerned sample |
[in] | _pu32ChannelNumber | Number of channels of the sample |
[in] | _pu32FrameNumber | Number of frame of the sample (number of "samples" = number of frames * number of channels) |
[in] | _pu32SampleRate | Sampling rate of the sample (ie. number of frames per second) |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_GetSpatialization | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT * | _pfMinDistance, | ||
orxFLOAT * | _pfMaxDistance, | ||
orxFLOAT * | _pfMinGain, | ||
orxFLOAT * | _pfMaxGain, | ||
orxFLOAT * | _pfRollOff | ||
) |
Gets a sound spatialization information
[in] | _pstSound | Concerned Sound |
[out] | _pfMinDistance | Min distance, inside which the max gain will be used, will be strictly negative if the sound isn't spatialized |
[out] | _pfMaxDistance | Max distance, outside which the gain will stop decreasing, will be strictly negative if the sound isn't spatialized |
[out] | _pfMinGain | Min gain in [0.0f - 1.0f] |
[out] | _pfMaxGain | Max gain in [0.0f - 1.0f] |
[out] | _pfRollOff | RollOff factor applied when interpolating the gain between inner and outer distances, defaults to 1.0f |
orxDLLAPI orxSOUNDSYSTEM_STATUS orxFASTCALL orxSoundSystem_GetStatus | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Gets a sound status (play/pause/stop)
[in] | _pstSound | Concerned sound |
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetTime | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Gets a sound's time (ie. cursor/play position from beginning)
[in] | _pstSound | Concerned sound |
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetVolume | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Gets a sound volume
[in] | _pstSound | Concerned sound |
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_HasRecordingSupport | ( | ) |
Is recording possible on the current system?
Inits the sound system module
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_IsListenerEnabled | ( | orxU32 | _u32ListenerIndex | ) |
Is listener enabled?
[in] | _u32ListenerIndex | Concerned listener index |
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_IsLooping | ( | const orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Is sound looping?
[in] | _pstSound | Concerned sound |
orxDLLAPI orxSOUNDSYSTEM_SAMPLE* orxFASTCALL orxSoundSystem_LoadSample | ( | const orxSTRING | _zFilename | ) |
Loads a sound sample from file (cannot be played directly)
[in] | _zFilename | Name of the file to load as a sample (completely loaded in memory, useful for sound effects) |
orxDLLAPI orxSOUNDSYSTEM_SOUND* orxFASTCALL orxSoundSystem_LoadStream | ( | orxHANDLE | _hUserData, |
const orxSTRING | _zFilename | ||
) |
Loads a streamed sound (can be played directly)
[in] | _hUserData | User data to associate with this sound |
[in] | _zFilename | Name of the file to load as a stream (won't be completely loaded in memory, useful for musics) |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Loop | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxBOOL | _bLoop | ||
) |
Loops a sound
[in] | _pstSound | Concerned sound |
[in] | _bLoop | Loop / no loop |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Pause | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Pauses a sound
[in] | _pstSound | Concerned sound |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Play | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Plays a sound
[in] | _pstSound | Concerned sound |
Removes all filters from a bus
[in] | _hBus | Concerned bus |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_RemoveAllFilters | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Removes all filters from a sound
[in] | _pstSound | Concerned sound |
Removes last added filter from a bus
[in] | _hBus | Concerned bus |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_RemoveLastFilter | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Removes last added filter from a sound
[in] | _pstSound | Concerned sound |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetBus | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxHANDLE | _hBus | ||
) |
Sets a sound's bus
[in] | _pstSound | Concerned sound |
[in] | _hBus | Concerned bus |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetBusParent | ( | orxHANDLE | _hBus, |
orxHANDLE | _hParentBus | ||
) |
Sets a bus's parent
[in] | _hBus | Concerned bus |
[in] | _hParentBus | Handle of the bus to use as parent |
Sets global volume
[in] | _fGlobalVolume | Global volume to set |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetListenerPosition | ( | orxU32 | _u32Index, |
const orxVECTOR * | _pvPosition | ||
) |
Sets listener position
[in] | _u32Index | Listener index, 0-based |
[in] | _pvPosition | Desired position |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPanning | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT | _fPanning, | ||
orxBOOL | _bMix | ||
) |
Sets a sound panning
[in] | _pstSound | panning |
[in] | _fPanning | Sound panning, -1.0f for full left, 0.0f for center, 1.0f for full right |
[in] | _bMix | Left/Right channels will be mixed if orxTRUE or act like a balance otherwise |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPitch | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT | _fPitch | ||
) |
Sets a sound pitch
[in] | _pstSound | Concerned sound |
[in] | _fPitch | Pitch to set |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPosition | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
const orxVECTOR * | _pvPosition | ||
) |
Sets a sound position
[in] | _pstSound | Concerned sound |
[in] | _pvPosition | Position to set |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetSampleData | ( | orxSOUNDSYSTEM_SAMPLE * | _pstSample, |
const orxFLOAT * | _afData, | ||
orxU32 | _u32SampleNumber | ||
) |
Sets sample data
[in] | _pstSample | Concerned sample |
[in] | _afData | Data to set (samples are expected to be signed/normalized) |
[in] | _u32SampleNumber | Number of samples in the data array |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetSpatialization | ( | orxSOUNDSYSTEM_SOUND * | _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
[in] | _pstSound | Concerned Sound |
[in] | _fMinDistance | Min distance, inside which the max gain will be used, strictly negative value to disable spatialization entirely |
[in] | _fMaxDistance | Max distance, outside which the gain will stop decreasing, strictly negative value to disable spatialization entirely |
[in] | _fMinGain | Min gain in [0.0f - 1.0f] |
[in] | _fMaxGain | Max gain in [0.0f - 1.0f] |
[in] | _fRollOff | RollOff factor applied when interpolating the gain between inner and outer distances, defaults to 1.0f |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetTime | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT | _fTime | ||
) |
Sets a sound time (ie. cursor/play position from beginning)
[in] | _pstSound | Concerned sound |
[in] | _fTime | Time, in seconds |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetVolume | ( | orxSOUNDSYSTEM_SOUND * | _pstSound, |
orxFLOAT | _fVolume | ||
) |
Sets a sound volume
[in] | _pstSound | Concerned sound |
[in] | _fVolume | Volume to set [0, 1] |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StartRecording | ( | const orxCHAR * | _zName, |
orxBOOL | _bWriteToFile, | ||
orxU32 | _u32SampleRate, | ||
orxU32 | _u32ChannelNumber | ||
) |
Starts recording
[in] | _zName | Name for the recorded sound/file |
[in] | _bWriteToFile | Should write to file? |
[in] | _u32SampleRate | Sample rate, 0 for default rate (48000Hz) |
[in] | _u32ChannelNumber | Channel number, 0 for default mono channel |
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Stop | ( | orxSOUNDSYSTEM_SOUND * | _pstSound | ) |
Stops a sound
[in] | _pstSound | Concerned sound |