Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00043 #ifndef _orxSOUNDSYSTEM_H_
00044 #define _orxSOUNDSYSTEM_H_
00045
00046 #include "orxInclude.h"
00047 #include "math/orxVector.h"
00048 #include "plugin/orxPluginCore.h"
00049
00050
00051
00052
00053
00054
00057 typedef struct __orxSOUNDSYSTEM_SOUND_t orxSOUNDSYSTEM_SOUND;
00058 typedef struct __orxSOUNDSYSTEM_SAMPLE_t orxSOUNDSYSTEM_SAMPLE;
00059
00062 typedef enum __orxSOUNDSYSTEM_STATUS_t
00063 {
00064 orxSOUNDSYSTEM_STATUS_PLAY = 0,
00065 orxSOUNDSYSTEM_STATUS_PAUSE,
00066 orxSOUNDSYSTEM_STATUS_STOP,
00067
00068 orxSOUNDSYSTEM_STATUS_NUMBER,
00069
00070 orxSOUNDSYSTEM_STATUS_NONE = orxENUM_NONE
00071
00072 } orxSOUNDSYSTEM_STATUS;
00073
00074
00077 #define orxSOUNDSYSTEM_KZ_CONFIG_SECTION "SoundSystem"
00078 #define orxSOUNDSYSTEM_KZ_CONFIG_RATIO "DimensionRatio"
00079
00080
00081
00082
00083
00084
00087 extern orxDLLAPI void orxFASTCALL orxSoundSystem_Setup();
00088
00089
00090
00091
00092
00093
00097 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Init();
00098
00101 extern orxDLLAPI void orxFASTCALL orxSoundSystem_Exit();
00102
00107 extern orxDLLAPI orxSOUNDSYSTEM_SAMPLE *orxFASTCALL orxSoundSystem_LoadSample(const orxSTRING _zFilename);
00108
00113 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_UnloadSample(orxSOUNDSYSTEM_SAMPLE *_pstSample);
00114
00119 extern orxDLLAPI orxSOUNDSYSTEM_SOUND *orxFASTCALL orxSoundSystem_CreateFromSample(const orxSOUNDSYSTEM_SAMPLE *_pstSample);
00120
00126 extern orxDLLAPI orxSOUNDSYSTEM_SOUND *orxFASTCALL orxSoundSystem_CreateStreamFromFile(const orxSTRING _zFilename, const orxSTRING _zReference);
00127
00131 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Delete(orxSOUNDSYSTEM_SOUND *_pstSound);
00132
00137 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Play(orxSOUNDSYSTEM_SOUND *_pstSound);
00138
00143 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Pause(orxSOUNDSYSTEM_SOUND *_pstSound);
00144
00149 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Stop(orxSOUNDSYSTEM_SOUND *_pstSound);
00150
00158 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StartRecording(const orxCHAR *_zName, orxBOOL _bWriteToFile, orxU32 _u32SampleRate, orxU32 _u32ChannelNumber);
00159
00163 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_StopRecording();
00164
00168 extern orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_HasRecordingSupport();
00169
00175 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetVolume(orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fVolume);
00176
00182 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPitch(orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fPitch);
00183
00189 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetPosition(orxSOUNDSYSTEM_SOUND *_pstSound, const orxVECTOR *_pvPosition);
00190
00196 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetAttenuation(orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fAttenuation);
00197
00203 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetReferenceDistance(orxSOUNDSYSTEM_SOUND *_pstSound, orxFLOAT _fDistance);
00204
00210 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_Loop(orxSOUNDSYSTEM_SOUND *_pstSound, orxBOOL _bLoop);
00211
00216 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetVolume(const orxSOUNDSYSTEM_SOUND *_pstSound);
00217
00222 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetPitch(const orxSOUNDSYSTEM_SOUND *_pstSound);
00223
00229 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSoundSystem_GetPosition(const orxSOUNDSYSTEM_SOUND *_pstSound, orxVECTOR *_pvPosition);
00230
00235 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetAttenuation(const orxSOUNDSYSTEM_SOUND *_pstSound);
00236
00241 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetReferenceDistance(const orxSOUNDSYSTEM_SOUND *_pstSound);
00242
00247 extern orxDLLAPI orxBOOL orxFASTCALL orxSoundSystem_IsLooping(const orxSOUNDSYSTEM_SOUND *_pstSound);
00248
00253 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetDuration(const orxSOUNDSYSTEM_SOUND *_pstSound);
00254
00259 extern orxDLLAPI orxSOUNDSYSTEM_STATUS orxFASTCALL orxSoundSystem_GetStatus(const orxSOUNDSYSTEM_SOUND *_pstSound);
00260
00265 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetGlobalVolume(orxFLOAT _fGlobalVolume);
00266
00270 extern orxDLLAPI orxFLOAT orxFASTCALL orxSoundSystem_GetGlobalVolume();
00271
00276 extern orxDLLAPI orxSTATUS orxFASTCALL orxSoundSystem_SetListenerPosition(const orxVECTOR *_pvPosition);
00277
00282 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSoundSystem_GetListenerPosition(orxVECTOR *_pvPosition);
00283
00284 #endif
00285