diff options
author | Max Horn | 2010-01-16 21:36:08 +0000 |
---|---|---|
committer | Max Horn | 2010-01-16 21:36:08 +0000 |
commit | 7ec2da968c9c572daa888e4f3215e99ba0e9e86b (patch) | |
tree | 17170e1ada083a09a6bbb8ac89889a9938473fa3 /engines/saga | |
parent | b8f2a3a34271b73ab2cb84ea25e5fbf80e076658 (diff) | |
download | scummvm-rg350-7ec2da968c9c572daa888e4f3215e99ba0e9e86b.tar.gz scummvm-rg350-7ec2da968c9c572daa888e4f3215e99ba0e9e86b.tar.bz2 scummvm-rg350-7ec2da968c9c572daa888e4f3215e99ba0e9e86b.zip |
Switch most AudioStream factories to use DisposeAfterUse::Flag
svn-id: r47334
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/music.cpp | 8 | ||||
-rw-r--r-- | engines/saga/sound.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 34b35305c2..37d211bc72 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -308,7 +308,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { Audio::LinearDiskStreamAudioBlock audioBlocks[1]; audioBlocks[0].pos = 0; audioBlocks[0].len = resData->size / 2; // 16-bit sound - audioStream = Audio::makeLinearDiskStream(musicStream, audioBlocks, 1, 11025, musicFlags, true); + audioStream = Audio::makeLinearDiskStream(musicStream, audioBlocks, 1, 11025, musicFlags, DisposeAfterUse::YES); } else { // Read compressed header to determine compression type musicFile->seek((uint32)resData->offset, SEEK_SET); @@ -316,15 +316,15 @@ void Music::play(uint32 resourceId, MusicFlags flags) { if (identifier == 0) { // MP3 #ifdef USE_MAD - audioStream = Audio::makeMP3Stream(musicStream, true); + audioStream = Audio::makeMP3Stream(musicStream, DisposeAfterUse::YES); #endif } else if (identifier == 1) { // OGG #ifdef USE_VORBIS - audioStream = Audio::makeVorbisStream(musicStream, true); + audioStream = Audio::makeVorbisStream(musicStream, DisposeAfterUse::YES); #endif } else if (identifier == 2) { // FLAC #ifdef USE_FLAC - audioStream = Audio::makeFlacStream(musicStream, true); + audioStream = Audio::makeFlacStream(musicStream, DisposeAfterUse::YES); #endif } } diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp index e611cd4bdc..2636567880 100644 --- a/engines/saga/sound.cpp +++ b/engines/saga/sound.cpp @@ -83,17 +83,17 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int switch (buffer.soundType) { #ifdef USE_MAD case kSoundMP3: - stream = Audio::makeMP3Stream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), true); + stream = Audio::makeMP3Stream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), DisposeAfterUse::YES); break; #endif #ifdef USE_VORBIS case kSoundOGG: - stream = Audio::makeVorbisStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), true); + stream = Audio::makeVorbisStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), DisposeAfterUse::YES); break; #endif #ifdef USE_FLAC case kSoundFLAC: - stream = Audio::makeFlacStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), true); + stream = Audio::makeFlacStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES), DisposeAfterUse::YES); break; #endif default: |