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/sword2/music.cpp | 6 +++--- engines/sword2/sound.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sword2') diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index 67d04c870d..e5936bb958 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -199,17 +199,17 @@ static Audio::AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, #ifdef USE_MAD case kMP3Mode: tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len); - return Audio::makeMP3Stream(tmp, true); + return Audio::makeMP3Stream(tmp, DisposeAfterUse::YES); #endif #ifdef USE_VORBIS case kVorbisMode: tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len); - return Audio::makeVorbisStream(tmp, true); + return Audio::makeVorbisStream(tmp, DisposeAfterUse::YES); #endif #ifdef USE_FLAC case kFlacMode: tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len); - return Audio::makeFlacStream(tmp, true); + return Audio::makeFlacStream(tmp, DisposeAfterUse::YES); #endif default: return NULL; diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp index 224bc66a95..2d02a2d3ba 100644 --- a/engines/sword2/sound.cpp +++ b/engines/sword2/sound.cpp @@ -336,7 +336,7 @@ int32 Sound::playFx(Audio::SoundHandle *handle, byte *data, uint32 len, uint8 vo if (Sword2Engine::isPsx()) input = new Audio::VagStream(stream); else - input = Audio::makeWAVStream(stream, true); + input = Audio::makeWAVStream(stream, DisposeAfterUse::YES); assert(input); -- cgit v1.2.3