diff options
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/intro.cpp | 12 | ||||
-rw-r--r-- | engines/sky/sound.cpp | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index ae6e445303..5e1b432418 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -733,8 +733,8 @@ bool Intro::nextPart(uint16 *&data) { // probably use _skySound instead of calling playRaw() // directly, but this will have to do for now. memset(vData, 127, sizeof(DataFileHeader)); - _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_voice, vData, _skyDisk->_lastLoadedFileSize, 11025, - Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED, SOUND_VOICE); + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_voice, vData, _skyDisk->_lastLoadedFileSize, DisposeAfterUse::YES, + 11025, Audio::Mixer::FLAG_UNSIGNED, SOUND_VOICE); return true; case WAITVOICE: while (_mixer->isSoundHandleActive(_voice)) @@ -749,13 +749,13 @@ bool Intro::nextPart(uint16 *&data) { return true; case LOOPBG: _mixer->stopID(SOUND_BG); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, - Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_LOOP, SOUND_BG); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_bgSfx, _bgBuf + 256, _bgSize - 768, DisposeAfterUse::YES, + 11025, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_LOOP, SOUND_BG); return true; case PLAYBG: _mixer->stopID(SOUND_BG); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_bgSfx, _bgBuf + 256, _bgSize - 768, 11025, - Audio::Mixer::FLAG_UNSIGNED, SOUND_BG); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_bgSfx, _bgBuf + 256, _bgSize - 768, DisposeAfterUse::YES, + 11025, Audio::Mixer::FLAG_UNSIGNED, SOUND_BG); return true; case STOPBG: _mixer->stopID(SOUND_BG); diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index 67cb1b8fbd..f46b40be86 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -1035,13 +1035,13 @@ Sound::~Sound() { void Sound::playSound(uint32 id, byte *sound, uint32 size, Audio::SoundHandle *handle) { byte flags = 0; - flags |= Audio::Mixer::FLAG_UNSIGNED|Audio::Mixer::FLAG_AUTOFREE; + flags |= Audio::Mixer::FLAG_UNSIGNED; size -= sizeof(DataFileHeader); byte *buffer = (byte *)malloc(size); memcpy(buffer, sound+sizeof(DataFileHeader), size); _mixer->stopID(id); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer, size, 11025, flags, id); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer, size, DisposeAfterUse::YES, 11025, flags, id); } void Sound::loadSection(uint8 pSection) { @@ -1116,9 +1116,9 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) { } if (channel == 0) - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound0, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH0, volume, 0, loopSta, loopEnd); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound0, _soundData + dataOfs, dataSize, DisposeAfterUse::NO, sampleRate, flags, SOUND_CH0, volume, 0, loopSta, loopEnd); else - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound1, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH1, volume, 0, loopSta, loopEnd); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_ingameSound1, _soundData + dataOfs, dataSize, DisposeAfterUse::NO, sampleRate, flags, SOUND_CH1, volume, 0, loopSta, loopEnd); } void Sound::fnStartFx(uint32 sound, uint8 channel) { @@ -1240,7 +1240,7 @@ bool Sound::startSpeech(uint16 textNum) { rate = 11025; _mixer->stopID(SOUND_SPEECH); - _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, playBuffer, speechSize, rate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE, SOUND_SPEECH); + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, playBuffer, speechSize, DisposeAfterUse::YES, rate, Audio::Mixer::FLAG_UNSIGNED, SOUND_SPEECH); return true; } |