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 _orxSOUND_H_
00044 #define _orxSOUND_H_
00045
00046
00047 #include "orxInclude.h"
00048 #include "sound/orxSoundSystem.h"
00049 #include "math/orxVector.h"
00050
00051
00054 typedef enum __orxSOUND_STATUS_t
00055 {
00056 orxSOUND_STATUS_PLAY = 0,
00057 orxSOUND_STATUS_PAUSE,
00058 orxSOUND_STATUS_STOP,
00059
00060 orxSOUND_STATUS_NUMBER,
00061
00062 orxSOUND_STATUS_NONE = orxENUM_NONE
00063
00064 } orxSOUND_STATUS;
00065
00066
00069 typedef struct __orxSOUND_t orxSOUND;
00070
00071
00074 typedef enum __orxSOUND_EVENT_t
00075 {
00076 orxSOUND_EVENT_START = 0,
00077 orxSOUND_EVENT_STOP,
00078 orxSOUND_EVENT_PACKET,
00079 orxSOUND_EVENT_RECORDING_START,
00080 orxSOUND_EVENT_RECORDING_STOP,
00081 orxSOUND_EVENT_RECORDING_PACKET,
00083 orxSOUND_EVENT_NUMBER,
00084
00085 orxSOUND_EVENT_NONE = orxENUM_NONE
00086
00087 } orxSOUND_EVENT;
00088
00091 typedef struct __orxSOUND_STREAM_INFO_t
00092 {
00093 orxU32 u32SampleRate;
00094 orxU32 u32ChannelNumber;
00096 } orxSOUND_STREAM_INFO;
00097
00100 typedef struct __orxSOUND_STREAM_PACKET_t
00101 {
00102 orxU32 u32SampleNumber;
00103 orxS16 *as16SampleList;
00104 orxBOOL bDiscard;
00105 orxFLOAT fTimeStamp;
00107 } orxSOUND_STREAM_PACKET;
00108
00111 typedef struct __orxSOUND_EVENT_PAYLOAD_t
00112 {
00113 const orxSTRING zSoundName;
00115 union
00116 {
00117 orxSOUND *pstSound;
00119 struct
00120 {
00121 orxSOUND_STREAM_INFO stInfo;
00122 orxSOUND_STREAM_PACKET stPacket;
00123 } stStream;
00124 };
00126 } orxSOUND_EVENT_PAYLOAD;
00127
00128
00131 extern orxDLLAPI void orxFASTCALL orxSound_Setup();
00132
00136 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Init();
00137
00140 extern orxDLLAPI void orxFASTCALL orxSound_Exit();
00141
00142
00147 extern orxDLLAPI orxSOUND *orxFASTCALL orxSound_CreateFromConfig(const orxSTRING _zConfigID);
00148
00153 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Delete(orxSOUND *_pstSound);
00154
00155
00160 extern orxDLLAPI orxBOOL orxFASTCALL orxSound_IsStream(orxSOUND *_pstSound);
00161
00162
00167 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Play(orxSOUND *_pstSound);
00168
00173 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Pause(orxSOUND *_pstSound);
00174
00179 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Stop(orxSOUND *_pstSound);
00180
00181
00189 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_StartRecording(const orxCHAR *_zName, orxBOOL _bWriteToFile, orxU32 _u32SampleRate, orxU32 _u32ChannelNumber);
00190
00194 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_StopRecording();
00195
00199 extern orxDLLAPI orxBOOL orxFASTCALL orxSound_HasRecordingSupport();
00200
00201
00207 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetVolume(orxSOUND *_pstSound, orxFLOAT _fVolume);
00208
00214 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPitch(orxSOUND *_pstSound, orxFLOAT _fPitch);
00215
00221 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetPosition(orxSOUND *_pstSound, const orxVECTOR *_pvPosition);
00222
00228 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetAttenuation(orxSOUND *_pstSound, orxFLOAT _fAttenuation);
00229
00235 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_SetReferenceDistance(orxSOUND *_pstSound, orxFLOAT _fDistance);
00236
00242 extern orxDLLAPI orxSTATUS orxFASTCALL orxSound_Loop(orxSOUND *_pstSound, orxBOOL _bLoop);
00243
00244
00249 extern orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetVolume(const orxSOUND *_pstSound);
00250
00255 extern orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetPitch(const orxSOUND *_pstSound);
00256
00262 extern orxDLLAPI orxVECTOR *orxFASTCALL orxSound_GetPosition(const orxSOUND *_pstSound, orxVECTOR *_pvPosition);
00263
00268 extern orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetAttenuation(const orxSOUND *_pstSound);
00269
00274 extern orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetReferenceDistance(const orxSOUND *_pstSound);
00275
00280 extern orxDLLAPI orxBOOL orxFASTCALL orxSound_IsLooping(const orxSOUND *_pstSound);
00281
00282
00287 extern orxDLLAPI orxFLOAT orxFASTCALL orxSound_GetDuration(const orxSOUND *_pstSound);
00288
00293 extern orxDLLAPI orxSOUND_STATUS orxFASTCALL orxSound_GetStatus(const orxSOUND *_pstSound);
00294
00299 extern orxDLLAPI const orxSTRING orxFASTCALL orxSound_GetName(const orxSOUND *_pstSound);
00300
00301 #endif
00302