#include <audio.h>
Public Member Functions | |
| AudioPlayer (EEMEngine *vm) | |
| void | setVoiceEnabled (bool enabled) |
| bool | voiceEnabled () const |
| void | playVoc (const Common::Path &vocPath) |
| bool | isVoicePlaying () const |
| _VoicePlaying @ 1ff1:01f9. | |
| void | waitForVoiceDone (uint32 maxMs=60000) |
| void | stopVoice () |
| _StopTheVoice @ 1ff1:0283. | |
| void | playFloppyVoiceSlot (uint slot, uint partner) |
| bool | initMysterySounds (uint mysteryNum) |
| void | cleanMysterySounds () |
| _CleanMysterySounds @ 202f:05a5. | |
| void | spoolSound (uint num) |
| void | waitForSpoolDone (uint32 maxMs=60000) |
| void | stopSpool () |
| Immediate _AIL_stop_digital_playback exit. | |
| bool | isSpoolPlaying () const |
| void | sayKDDigital (const byte *kdTextIndex, uint kdspeak, uint partner) |
| void | sayKDHintDigital (const byte *kdTextIndex, uint slot, uint partner) |
| void | stopAll () |
| _QuitSounds @ 1ff1:03c5. | |
Non-MIDI audio (digitised voice + SFX). Mirrors SOUND.C / SPOOLSND.C.
M60.SDB/SDX holds the 19 voiceovers between ANIM01..ANIM20 in _DoOpeningAnims (loaded via _InitMysterySounds(0x3c)). M0..M55 hold per-mystery clue voice + partner KDDigital lines.
|
inline |
Setup-screen voice toggle. Mirrors DAT_2d5d_3f97 — every original _PlayVoice / _SpoolSound is wrapped in if ((DAT_2d5d_3f97 != 0) && (_VoiceAvailable != 0)); we pull the flag in here so callers don't duplicate the gate.
| void EEM::AudioPlayer::playVoc | ( | const Common::Path & | vocPath | ) |
Loads the named .VOC from the game directory and hands it to the speech mixer channel. Mirrors _LoadSoundName + _PlayVoice @ 1ff1:0299 / 1ff1:023e. A new playVoc cancels any prior voice.
| void EEM::AudioPlayer::waitForVoiceDone | ( | uint32 | maxMs = 60000 | ) |
_WaitForVoiceDone @ 1ff1:0221. Blocks (with frame + event pumping) until the voice clip finishes; returns early on click / keypress.
| void EEM::AudioPlayer::playFloppyVoiceSlot | ( | uint | slot, |
| uint | partner | ||
| ) |
Play a floppy VOC by 0..25 slot index in the per-partner voice table. Mirrors _LoadSoundName_Floppy @ 1f4e:0305 (tables at 2608:0f0e Jake / 2608:0f76 Jenny). partner: 0=Jake, 1=Jenny. Common slots: 12 = PHONESL.VOC, 20 = partner intro, 25 = THUNDER.VOC.
| bool EEM::AudioPlayer::initMysterySounds | ( | uint | mysteryNum | ) |
Loads the current mystery voice bundle. DOS uses Mu.SDX/Mu.SDB; Mac uses M%02u.DBD/M%02u.CPD 'csnd'/'snd ' resources.
| void EEM::AudioPlayer::spoolSound | ( | uint | num | ) |
Reads + decompresses SDX entry num from the active SDB and queues it for SFX playback. Mirrors _SpoolSound @ 202f:068d. Original blocks until playback finishes; we run async — use waitForSpoolDone to opt in to the original block-then-continue semantics.
| void EEM::AudioPlayer::waitForSpoolDone | ( | uint32 | maxMs = 60000 | ) |
Wait loop inside _UncompressedSound / _DeCompressSound; aborts on click / keypress (same abort behaviour as the original).
| void EEM::AudioPlayer::sayKDDigital | ( | const byte * | kdTextIndex, |
| uint | kdspeak, | ||
| uint | partner | ||
| ) |
Mirrors _SayKDDigital(kdspeak) @ 2404:0fbc. Each mystery embeds a KDDigitalIndex table 18 bytes (+0x12) after its KDTextIndex header (set up by _ReadMystery @ 2404:008f: _KDDigitalIndex = _KDTextIndex
| void EEM::AudioPlayer::sayKDHintDigital | ( | const byte * | kdTextIndex, |
| uint | slot, | ||
| uint | partner | ||
| ) |
_SayKDHintDigital @ 2542:187e — EEM2/London partner chain-hint voice. Like sayKDDigital but indexes the table 0x3a after KDTextIndex (vs 0x12) with no +1 bias. slot is the 0..4 hint-chain slot.