25 #define SFNAME_TITLE "jungle.mp3" 26 #define SFNAME_MENU "on_a_mission.mp3" 27 #define SFNAME_ROBO "low_techno.mp3" 28 #define SFNAME_MEXI "ambient_mexi_howl.mp3" 29 #define SFNAME_BASSO "amb_walkin_basso.mp3" 30 #define SFNAME_WIND "dangerous_wind.mp3" 31 #define SFNAME_INDUSTRO "industro_hunch.mp3" 32 #define SFNAME_JACKIN "jaround.mp3" 33 #define SFNAME_SNEAKERS "lost_my_sneakers.mp3" 34 #define SFNAME_QUIET "mysterious_quiet.mp3" 35 #define SFNAME_JEEBIES "jeebies5B.mp3" 36 #define SFNAME_VIBRACIOUS "vibracious_(dope_delivery_mix).mp3" 37 #define SFNAME_ROMANTIC "romantic.mp3" 38 #define SFNAME_ARETHERE "AreWeThereYet_(extended).mp3" 40 #define SFNAME_CORRIDOR "corridor(extended).mp3" 41 #define SFNAME_MOKE "moke_a_doke_doke.mp3" 42 #define SFNAME_TILES "tilesache(extended).mp3" 43 #define SFNAME_DARKVIB "vibracious_(Dark_Delivery_Mix).mp3" 44 #define SFNAME_EXPER "experimentatus_(extended).mp3" 46 #define FIRST_VOICE V00_AIRLOCK_01 47 #define NUM_VOICES ( LAST_SOUND - FIRST_VOICE ) 49 #include "audio/audiostream.h" 50 #include "audio/mixer.h" 60 kLaserChannel = kMaxSNDChannels - 1
80 SND_CELLHOLDER_USE_REJECT,
105 SND_MAILSORTER_HAPPY,
130 SND_SHOCKBOT_AMBIENT,
132 SND_RAILRIDER_ONTRACK,
136 SND_MAILSORTER_UNHAPPY,
145 SND_RIGHTBOT_STUNNED,
155 SND_DEADEYE_ATTACK01,
156 SND_DEADEYE_ATTACK02,
163 SND_MACHINE_AMBIENT1,
175 SND_GOOD_FAERIE_AMBIENT,
176 SND_GOOD_FAERIE_SPELL,
177 SND_GOOD_FAERIE_STUNNED,
186 SND_MONKEYSTONE_SECRET_STAR,
194 SND_DRAGON_FALLASLEEP,
195 SND_DRAGON_BREATHEFIRE,
196 SND_BADFAIRY_AMBIENT,
198 SND_BADFAIRY_STUNNED,
200 SND_DEMIGOD_HOLYSPEECH,
202 SND_GATEPUDDLE_AMBIENT,
203 SND_GATEPUDDLE_DISSIPATE,
204 SND_GATEPUDDLE_SPAWN,
1317 V30_CHICKEN_EXPLOSION_01,
1318 V30_CHICKEN_EXPLOSION_02,
1424 const char *luaName;
1431 Voice() : active(
false) {}
1435 SNDMEM_FREEABLE = -1,
1436 SNDMEM_NOTCACHED = 0,
1451 const char *luaName;
1455 SoundCache() : loaded(SNDMEM_NOTCACHED), size(0), name(
nullptr), luaName(
nullptr), ext(SNDTYPE_NONE), data(
nullptr) {}
1460 Song() : _playing(
false), _song(SONG_NONE),
1461 fadingOut(
false), fadeOutVol(0), fadeOutRamp(0),
1462 fadingIn(
false), fadeInVol(0), fadeInRamp(0) {}
1464 void playSong(SoundType song,
bool fadeIn,
int ramp);
1465 void fadeOut(
int ramp);
1468 bool isPlaying()
const;
1469 SoundType getSong()
const;
1504 void setVoiceStatus(
bool value) {
1507 bool getVoiceStatus() {
1510 void clearPersistent() {
1511 memset(_voicePlayed, 0, NUM_VOICES *
sizeof(byte));
1514 void playSound(
int index);
1515 void playSoundEx(
int index,
int channel,
bool loop);
1516 void playVoice(
int index,
int actor);
1518 if (_voices[0].active) {
1520 _voices[0].active =
false;
1522 if (_voices[1].active) {
1524 _voices[1].active =
false;
1527 void startMusic(SoundType song);
1528 void fadeInMusic(SoundType song,
int ramp);
1529 void fadeOutMusic(
int ramp);
1531 void beginMusic(SoundType song,
bool fadeIn,
int ramp);
1535 bool songPlaying(SoundType song);
1536 void stopChannel(
int channel);
1537 int registerSound(
const char *name);
1538 void freeSound(
int index);
1539 const char *getSNDLuaName(
int index);
1540 int getSNDIndex(
const char *name);
1541 int getNumSounds() {
1545 SoundType whatSongIsPlaying();
1547 void markSoundCacheFreeable();
1557 Voice _voices[MAX_VOICES];
1560 byte _voicePlayed[NUM_VOICES];
1564 Song _song1, _song2;
1576 #endif // !HDB_SOUND_H Definition: ai-player.h:25
Definition: savefile.h:54
virtual void stopHandle(SoundHandle handle)=0
Definition: audiostream.h:50
Audio::Mixer * _mixer
Definition: engine.h:153