diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/cup_player_he.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/player_mod.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 10 |
4 files changed, 13 insertions, 12 deletions
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp index 49084d6a71..c3dea409e5 100644 --- a/engines/scumm/he/cup_player_he.cpp +++ b/engines/scumm/he/cup_player_he.cpp @@ -171,7 +171,8 @@ void CUP_Player::updateSfx() { uint32 soundSize = READ_BE_UINT32(soundData + 4); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &sfxChannel->handle, Audio::makeLoopingAudioStream( - Audio::makeRawMemoryStream(soundData + 8, soundSize - 8, DisposeAfterUse::NO, 11025, Audio::FLAG_UNSIGNED), + Audio::makeRawMemoryStream(soundData + 8, soundSize - 8, + 11025, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO), (sfx->flags & kSfxFlagLoop) ? 0 : 1 ) ); diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 48adca2ca9..69e18fee76 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -574,7 +574,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) musicFile.close(); if (_vm->_game.heversion == 70) { - stream = Audio::makeRawMemoryStream(spoolPtr, size, DisposeAfterUse::NO, 11025, flags); + stream = Audio::makeRawMemoryStream(spoolPtr, size, 11025, flags, DisposeAfterUse::NO); _mixer->playInputStream(type, &_heSoundChannels[heChannel], stream, soundID); return; } @@ -667,9 +667,9 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) #ifdef SCUMM_LITTLE_ENDIAN flags |= Audio::FLAG_LITTLE_ENDIAN; #endif - stream = Audio::makeRawMemoryStream(sound + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags); + stream = Audio::makeRawMemoryStream(sound + heOffset, size - heOffset, rate, flags); } else { - stream = Audio::makeRawMemoryStream(ptr + memStream.pos() + heOffset, size - heOffset, DisposeAfterUse::YES, rate, flags); + stream = Audio::makeRawMemoryStream(ptr + memStream.pos() + heOffset, size - heOffset, rate, flags); } _mixer->playInputStream(type, &_heSoundChannels[heChannel], Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID); @@ -729,7 +729,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _mixer->stopHandle(_heSoundChannels[heChannel]); - stream = Audio::makeRawMemoryStream(ptr + heOffset + 8, size, DisposeAfterUse::NO, rate, flags); + stream = Audio::makeRawMemoryStream(ptr + heOffset + 8, size, rate, flags, DisposeAfterUse::NO); _mixer->playInputStream(type, &_heSoundChannels[heChannel], Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID); } @@ -750,7 +750,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _mixer->stopID(_currentMusic); _currentMusic = soundID; - stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, 0); + stream = Audio::makeRawMemoryStream(sound, size, rate, 0); _mixer->playInputStream(Audio::Mixer::kMusicSoundType, NULL, stream, soundID); } else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) { diff --git a/engines/scumm/player_mod.cpp b/engines/scumm/player_mod.cpp index bbbd87fd2a..be7abea47c 100644 --- a/engines/scumm/player_mod.cpp +++ b/engines/scumm/player_mod.cpp @@ -95,7 +95,7 @@ void Player_MOD::startChannel(int id, void *data, int size, int rate, uint8 vol, _channels[i].pan = pan; _channels[i].freq = rate; _channels[i].ctr = 0; - _channels[i].input = Audio::makeRawMemoryStream_OLD((const byte*)data, size, DisposeAfterUse::YES, rate, 0, loopStart, loopEnd); + _channels[i].input = Audio::makeRawMemoryStream_OLD((const byte*)data, size, rate, 0, loopStart, loopEnd); // read the first sample _channels[i].input->readBuffer(&_channels[i].pos, 1); } diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 6061c775a9..64d2e284ce 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -203,7 +203,7 @@ void Sound::playSound(int soundID) { sound = (byte *)malloc(size); memcpy(sound, ptr, size); - stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, Audio::FLAG_UNSIGNED); + stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } // WORKAROUND bug # 1311447 @@ -226,7 +226,7 @@ void Sound::playSound(int soundID) { // Allocate a sound buffer, copy the data into it, and play sound = (byte *)malloc(size); memcpy(sound, ptr, size); - stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, Audio::FLAG_UNSIGNED); + stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } // Support for sampled sound effects in Monkey Island 1 and 2 @@ -298,7 +298,7 @@ void Sound::playSound(int soundID) { // Allocate a sound buffer, copy the data into it, and play sound = (byte *)malloc(size); memcpy(sound, ptr + 6, size); - stream = Audio::makeRawMemoryStream(sound, size, DisposeAfterUse::YES, rate, Audio::FLAG_UNSIGNED); + stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } else if ((_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 3) || READ_BE_UINT32(ptr) == MKID_BE('SOUN') || READ_BE_UINT32(ptr) == MKID_BE('TOWS')) { @@ -349,7 +349,7 @@ void Sound::playSound(int soundID) { } size -= waveSize; - stream = Audio::makeRawMemoryStream_OLD(sound, waveSize, DisposeAfterUse::YES, rate, Audio::FLAG_UNSIGNED, loopStart, loopEnd); + stream = Audio::makeRawMemoryStream_OLD(sound, waveSize, rate, Audio::FLAG_UNSIGNED, loopStart, loopEnd); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, 255, 0); } break; @@ -440,7 +440,7 @@ void Sound::playSound(int soundID) { } memcpy(sound, ptr + READ_BE_UINT16(ptr + 8), size); - stream = Audio::makeRawMemoryStream_OLD(sound, size, DisposeAfterUse::YES, rate, 0, loopStart, loopEnd); + stream = Audio::makeRawMemoryStream_OLD(sound, size, rate, 0, loopStart, loopEnd); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, vol, 0); } else { |