void Sound::playSfx5Data(byte *soundData, uint sound, uint pan, uint vol) { if (_sfx5Paused) return; _mixer->stopHandle(_sfx5Handle); playSoundData(&_sfx5Handle, soundData, sound, pan, vol, true); }
void PCSound::playSound(const char *base, bool isSpeech) { char name[13]; strcpy(name, base); // alter filename to add zeros and append ".SB" for (int i = 0; i < 8; i++) { if (name[i] == ' ') name[i] = '0'; } strcat(name, ".SB"); if (isSpeech) { while (_mixer->isSoundHandleActive(_speechHandle)) { _vm->input()->delay(10); } } else { _mixer->stopHandle(_sfxHandle); } uint32 size; Common::File *f = _vm->resource()->findSound(name, &size); if (f) { playSoundData(f, size, isSpeech ? &_speechHandle : &_sfxHandle); _speechSfxExists = isSpeech; } else { _speechSfxExists = false; } }
// Feeble Files specific void Sound::playAmbientData(byte *soundData, uint sound, uint pan, uint vol) { if (sound == _ambientPlaying) return; _ambientPlaying = sound; if (_ambientPaused) return; _mixer->stopHandle(_ambientHandle); playSoundData(&_ambientHandle, soundData, sound, pan, vol, true); }
void Sound::playVoiceData(byte *soundData, uint sound) { _mixer->stopHandle(_voiceHandle); playSoundData(&_voiceHandle, soundData, sound); }
void Sound::playSfxData(byte *soundData, uint sound, uint pan, uint vol) { if (_effectsPaused) return; playSoundData(&_effectsHandle, soundData, sound, pan, vol, false); }