From 7ec2da968c9c572daa888e4f3215e99ba0e9e86b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 16 Jan 2010 21:36:08 +0000 Subject: Switch most AudioStream factories to use DisposeAfterUse::Flag svn-id: r47334 --- engines/agos/animation.cpp | 4 ++-- engines/agos/sound.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 258f9b670c..5b72b948f8 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -302,10 +302,10 @@ void MoviePlayerDXA::startSound() { size = in.readUint32LE(); in.seek(offset, SEEK_SET); - _bgSoundStream = Audio::makeWAVStream(in.readStream(size), true); + _bgSoundStream = Audio::makeWAVStream(in.readStream(size), DisposeAfterUse::YES); in.close(); } else { - _bgSoundStream = Audio::makeWAVStream(_fileStream->readStream(size), true); + _bgSoundStream = Audio::makeWAVStream(_fileStream->readStream(size), DisposeAfterUse::YES); } } else { _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(baseName); diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 77604eca75..4d79f4fed3 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -248,7 +248,7 @@ Audio::AudioStream *WavSound::makeAudioStream(uint sound) { return NULL; _file->seek(_offsets[sound], SEEK_SET); - return Audio::makeWAVStream(_file, false); + return Audio::makeWAVStream(_file, DisposeAfterUse::NO); } void WavSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) { @@ -302,7 +302,7 @@ Audio::AudioStream *MP3Sound::makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = _file->readStream(size); assert(tmp); - return Audio::makeMP3Stream(tmp, true); + return Audio::makeMP3Stream(tmp, DisposeAfterUse::YES); } void MP3Sound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) { @@ -333,7 +333,7 @@ Audio::AudioStream *VorbisSound::makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = _file->readStream(size); assert(tmp); - return Audio::makeVorbisStream(tmp, true); + return Audio::makeVorbisStream(tmp, DisposeAfterUse::YES); } void VorbisSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) { @@ -364,7 +364,7 @@ Audio::AudioStream *FlacSound::makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = _file->readStream(size); assert(tmp); - return Audio::makeFlacStream(tmp, true); + return Audio::makeFlacStream(tmp, DisposeAfterUse::YES); } void FlacSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) { @@ -783,7 +783,7 @@ void Sound::playVoiceData(byte *soundData, uint sound) { void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint sound, int pan, int vol, bool loop) { int size = READ_LE_UINT32(soundData + 4); Common::MemoryReadStream *stream = new Common::MemoryReadStream(soundData, size); - Audio::RewindableAudioStream *sndStream = Audio::makeWAVStream(stream, true); + Audio::RewindableAudioStream *sndStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES); convertVolume(vol); convertPan(pan); -- cgit v1.2.3