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
107 bool init(uint sampleRate, uint channels = 32);
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);
254 bool registerScriptBindings();
Definition: outputpersistenceblock.h:39
Definition: persistable.h:39
Definition: resource.h:43
Definition: resservice.h:43
Definition: soundengine.h:80
Resource * loadResource(const Common::String &fileName) override
void setVolume(float volume, SOUND_TYPES type)
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)
float getSoundVolume(uint handle)
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)
void stopSound(uint handle)
bool init(uint sampleRate, uint channels=32)
void(* DynamicSoundReadCallback)(void *UserData, void *Data, uint DataLength)
Definition: soundengine.h:94
bool isSoundPlaying(uint handle)
void resumeLayer(uint layer)
void setSoundPanning(uint handle, float pan)
void pauseSound(uint handle)
void resumeSound(uint handle)
float getSoundPanning(uint handle)
bool canLoadResource(const Common::String &fileName) override
bool isSoundPaused(uint handle)
void setSoundVolume(uint handle, float volume)
float getVolume(SOUND_TYPES type)
void pauseLayer(uint layer)
Definition: soundengine.h:62