aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorMax Horn2010-01-16 21:36:08 +0000
committerMax Horn2010-01-16 21:36:08 +0000
commit7ec2da968c9c572daa888e4f3215e99ba0e9e86b (patch)
tree17170e1ada083a09a6bbb8ac89889a9938473fa3 /engines/agos
parentb8f2a3a34271b73ab2cb84ea25e5fbf80e076658 (diff)
downloadscummvm-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/agos')
-rw-r--r--engines/agos/animation.cpp4
-rw-r--r--engines/agos/sound.cpp10
2 files changed, 7 insertions, 7 deletions
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);