44 #ifndef SWORD25_SOUNDENGINE_H 45 #define SWORD25_SOUNDENGINE_H 47 #include "sword25/kernel/common.h" 48 #include "sword25/kernel/resservice.h" 49 #include "sword25/kernel/persistable.h" 51 #include "audio/mixer.h" 55 #define SOUND_HANDLES 32 94 typedef void (*DynamicSoundReadCallback)(
void *UserData,
void *Data, uint DataLength);
107 bool init(uint sampleRate, uint channels = 32);
123 void setVolume(
float volume, SOUND_TYPES type);
131 float getVolume(SOUND_TYPES type);
147 void pauseLayer(uint layer);
153 void resumeLayer(uint layer);
171 bool playSound(
const Common::String &fileName, SOUND_TYPES type,
float volume = 1.0f,
float pan = 0.0f,
bool loop =
false,
int loopStart = -1,
int loopEnd = -1, uint layer = 0);
188 uint playSoundEx(
const Common::String &fileName, SOUND_TYPES type,
float volume = 1.0f,
float pan = 0.0f,
bool loop =
false,
int loopStart = -1,
int loopEnd = -1, uint layer = 0, uint handleId = 0x1337);
195 void setSoundVolume(uint handle,
float volume);
202 void setSoundPanning(uint handle,
float pan);
208 void pauseSound(uint handle);
214 void resumeSound(uint handle);
221 void stopSound(uint handle);
228 bool isSoundPaused(uint handle);
235 bool isSoundPlaying(uint handle);
240 float getSoundVolume(uint handle);
245 float getSoundPanning(uint handle);
254 bool registerScriptBindings();
Definition: soundengine.h:80
Definition: resource.h:43
Definition: persistable.h:39
Definition: resservice.h:43
Definition: soundengine.h:62
Definition: outputpersistenceblock.h:39