22 #ifndef ASYLUM_SYSTEM_SOUND_H 23 #define ASYLUM_SYSTEM_SOUND_H 25 #include "common/array.h" 26 #include "common/rect.h" 28 #include "audio/mixer.h" 30 #include "asylum/system/config.h" 32 #include "asylum/shared.h" 41 ResourceId resourceId;
47 resourceId = kResourceNone;
55 ResourceId resourceId;
63 resourceId = kResourceNone;
75 ResourceId resourceId;
85 resourceId = kResourceNone;
89 memset(&flagNum, 0,
sizeof(flagNum));
94 ResourceId resourceId;
98 resourceId = kResourceNone;
119 void playSound(ResourceId resourceId,
bool looping =
false, int32 volume = Config.sfxVolume, int32 panning = 0);
127 void playMusic(ResourceId resourceId, int32 volume = Config.musicVolume);
135 void changeMusic(int32 index, int32 musicStatusExt);
144 bool isPlaying(ResourceId resourceId);
156 void setVolume(ResourceId resourceId, int32 volume);
163 void setMusicVolume(int32 volume);
178 void setPanning(ResourceId resourceId, int32 panning);
189 int32 calculateVolumeAdjustement(
const Common::Point &point, int32 attenuation, int32 delta);
198 int32 getAdjustedVolume(int32 volume)
const;
218 void stop(ResourceId resourceId);
225 void stopAll(ResourceId resourceId);
246 static void convertVolumeFrom(int32 &vol);
253 static void convertVolumeTo(int32 &vol);
310 bool isValidSoundResource(ResourceId resourceId);
334 static void convertPan(int32 &pan);
339 #endif // ASYLUM_SYSTEM_SOUND_H
SoundType
Definition: mixer.h:62
int32 getMusicVolume()
Definition: sound.h:170