Defines | Typedefs | Enumerations | Functions

OrxSoundSystem

Defines

#define orxSOUNDSYSTEM_KZ_CONFIG_RATIO   "DimensionRatio"
#define orxSOUNDSYSTEM_KZ_CONFIG_SECTION   "SoundSystem"

Typedefs

typedef struct
__orxSOUNDSYSTEM_SAMPLE_t 
orxSOUNDSYSTEM_SAMPLE
typedef struct
__orxSOUNDSYSTEM_SOUND_t 
orxSOUNDSYSTEM_SOUND

Enumerations

enum  orxSOUNDSYSTEM_STATUS {
  orxSOUNDSYSTEM_STATUS_PLAY = 0, orxSOUNDSYSTEM_STATUS_PAUSE, orxSOUNDSYSTEM_STATUS_STOP, orxSOUNDSYSTEM_STATUS_NUMBER,
  orxSOUNDSYSTEM_STATUS_NONE = orxENUM_NONE
}

Functions

orxDLLAPI orxSOUNDSYSTEM_SOUND
*orxFASTCALL 
orxSoundSystem_CreateFromSample (const orxSOUNDSYSTEM_SAMPLE *_pstSample)
orxDLLAPI orxSOUNDSYSTEM_SOUND
*orxFASTCALL 
orxSoundSystem_CreateStreamFromFile (const orxSTRING _zFilename, const orxSTRING _zReference)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Delete (orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI void orxFASTCALL orxSoundSystem_Exit ()
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetAttenuation (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetDuration (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetGlobalVolume ()
orxDLLAPI orxVECTOR *orxFASTCALL orxSoundSystem_GetListenerPosition (orxVECTOR *_pvPosition)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetPitch (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxVECTOR *orxFASTCALL orxSoundSystem_GetPosition (const orxSOUNDSYSTEM_SOUND *_pstSound, orxVECTOR *_pvPosition)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetReferenceDistance (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI
orxSOUNDSYSTEM_STATUS
orxFASTCALL 
orxSoundSystem_GetStatus (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetVolume (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_HasRecordingSupport ()
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Init ()
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_IsLooping (const orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI
orxSOUNDSYSTEM_SAMPLE
*orxFASTCALL 
orxSoundSystem_LoadSample (const orxSTRING _zFilename)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Loop (orxSOUNDSYSTEM_SOUND *_pstSound, orxBOOL _bLoop)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Pause (orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Play (orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetAttenuation (orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fAttenuation)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetGlobalVolume (orxFLOAT _fGlobalVolume)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetListenerPosition (const orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPitch (orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fPitch)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPosition (orxSOUNDSYSTEM_SOUND *_pstSound, const orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetReferenceDistance (orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fDistance)
orxDLLAPI void orxFASTCALL orxSoundSystem_Setup ()
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetVolume (orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fVolume)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StartRecording (const orxCHAR *_zName, orxBOOL _bWriteToFile, orxU32 _u32SampleRate, orxU32 _u32ChannelNumber)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Stop (orxSOUNDSYSTEM_SOUND *_pstSound)
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StopRecording ()
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_UnloadSample (orxSOUNDSYSTEM_SAMPLE *_pstSample)

Detailed Description

Sound system plugin module Plugin module that handles sound system


Define Documentation

#define orxSOUNDSYSTEM_KZ_CONFIG_RATIO   "DimensionRatio"

Definition at line 78 of file orxSoundSystem.h.

#define orxSOUNDSYSTEM_KZ_CONFIG_SECTION   "SoundSystem"

Config defines

Definition at line 77 of file orxSoundSystem.h.


Typedef Documentation

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.


Enumeration Type Documentation

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.


Function Documentation

orxDLLAPI orxSOUNDSYSTEM_SOUND* orxFASTCALL orxSoundSystem_CreateFromSample ( const orxSOUNDSYSTEM_SAMPLE _pstSample )

Creates a sound from preloaded sample (can be played directly)

Parameters:
[in]_pstSampleConcerned sample
Returns:
orxSOUNDSYSTEM_SOUND / orxNULL
orxDLLAPI orxSOUNDSYSTEM_SOUND* orxFASTCALL orxSoundSystem_CreateStreamFromFile ( const orxSTRING  _zFilename,
const orxSTRING  _zReference 
)

Creates a streamed sound from file (can be played directly)

Parameters:
[in]_zFilenameName of the file to load as a stream (won't be completely loaded in memory, useful for musics)
[in]_zReferenceReference name used for streaming events (usually the corresponding config ID)
Returns:
orxSOUNDSYSTEM_SOUND / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Delete ( orxSOUNDSYSTEM_SOUND _pstSound )

Deletes a sound

Parameters:
[in]_pstSoundConcerned sound
orxDLLAPI void orxFASTCALL orxSoundSystem_Exit (  )

Exits from the sound system module

orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetAttenuation ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound attenuation

Parameters:
[in]_pstSoundConcerned Sound
Returns:
Sound's attenuation
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetDuration ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound duration

Parameters:
[in]_pstSoundConcerned sound
Returns:
Sound's duration (seconds)
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetGlobalVolume (  )

Gets global volume

Returns:
Gobal volume
orxDLLAPI orxVECTOR* orxFASTCALL orxSoundSystem_GetListenerPosition ( orxVECTOR _pvPosition )

Gets listener position

Parameters:
[out]_pvPositionListener's position
Returns:
orxVECTOR / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetPitch ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound pitch

Parameters:
[in]_pstSoundConcerned sound
Returns:
Sound's pitch
orxDLLAPI orxVECTOR* orxFASTCALL orxSoundSystem_GetPosition ( const orxSOUNDSYSTEM_SOUND _pstSound,
orxVECTOR _pvPosition 
)

Gets a sound position

Parameters:
[in]_pstSoundConcerned sound
[out]_pvPositionPosition to get
Returns:
Sound's position
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetReferenceDistance ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound reference distance

Parameters:
[in]_pstSoundConcerned Sound
Returns:
Sound's reference distance
orxDLLAPI orxSOUNDSYSTEM_STATUS orxFASTCALL orxSoundSystem_GetStatus ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound status (play/pause/stop)

Parameters:
[in]_pstSoundConcerned sound
Returns:
orxSOUNDSYSTEM_STATUS
orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetVolume ( const orxSOUNDSYSTEM_SOUND _pstSound )

Gets a sound volume

Parameters:
[in]_pstSoundConcerned sound
Returns:
Sound's volume
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_HasRecordingSupport (  )

Is recording possible on the current system?

Returns:
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Init (  )

Inits the sound system module

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_IsLooping ( const orxSOUNDSYSTEM_SOUND _pstSound )

Is sound looping?

Parameters:
[in]_pstSoundConcerned sound
Returns:
orxTRUE if looping, orxFALSE otherwise
orxDLLAPI orxSOUNDSYSTEM_SAMPLE* orxFASTCALL orxSoundSystem_LoadSample ( const orxSTRING  _zFilename )

Loads a sound sample from file (cannot be played directly)

Parameters:
[in]_zFilenameName of the file to load as a sample (completely loaded in memory, useful for sound effects)
Returns:
orxSOUNDSYSTEM_SAMPLE / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Loop ( orxSOUNDSYSTEM_SOUND _pstSound,
orxBOOL  _bLoop 
)

Loops a sound

Parameters:
[in]_pstSoundConcerned sound
[in]_bLoopLoop / no loop
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Pause ( orxSOUNDSYSTEM_SOUND _pstSound )

Pauses a sound

Parameters:
[in]_pstSoundConcerned sound
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Play ( orxSOUNDSYSTEM_SOUND _pstSound )

Plays a sound

Parameters:
[in]_pstSoundConcerned sound
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetAttenuation ( orxSOUNDSYSTEM_SOUND _pstSound,
orxFLOAT  _fAttenuation 
)

Sets a sound attenuation

Parameters:
[in]_pstSoundConcerned Sound
[in]_fAttenuationDesired attenuation
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetGlobalVolume ( orxFLOAT  _fGlobalVolume )

Sets global volume

Parameters:
[in]_fGlobalVolumeGlobal volume to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetListenerPosition ( const orxVECTOR _pvPosition )

Sets listener position

Parameters:
[in]_pvPositionDesired position
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPitch ( orxSOUNDSYSTEM_SOUND _pstSound,
orxFLOAT  _fPitch 
)

Sets a sound pitch

Parameters:
[in]_pstSoundConcerned sound
[in]_fPitchPitch to set
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPosition ( orxSOUNDSYSTEM_SOUND _pstSound,
const orxVECTOR _pvPosition 
)

Sets a sound position

Parameters:
[in]_pstSoundConcerned sound
[in]_pvPositionPosition to set
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetReferenceDistance ( orxSOUNDSYSTEM_SOUND _pstSound,
orxFLOAT  _fDistance 
)

Sets a sound reference distance

Parameters:
[in]_pstSoundConcerned Sound
[in]_fDistanceWithin this distance, sound is perceived at its maximum volume
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxSoundSystem_Setup (  )

Sound system module setup

orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetVolume ( orxSOUNDSYSTEM_SOUND _pstSound,
orxFLOAT  _fVolume 
)

Sets a sound volume

Parameters:
[in]_pstSoundConcerned sound
[in]_fVolumeVolume to set [0, 1]
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_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 (44100Hz)
[in]_u32ChannelNumberChannel number, 0 for default mono channel
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Stop ( orxSOUNDSYSTEM_SOUND _pstSound )

Stops a sound

Parameters:
[in]_pstSoundConcerned sound
Returns:
orxSTATUS_SUCCESS / orxSTATSUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StopRecording (  )

Stops recording

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_UnloadSample ( orxSOUNDSYSTEM_SAMPLE _pstSample )

Unloads a sound sample

Parameters:
[in]_pstSampleConcerned sample
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6