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/kyra | |
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/kyra')
-rw-r--r-- | engines/kyra/sound.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/sound.h | 4 | ||||
-rw-r--r-- | engines/kyra/sound_digital.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index b97d367206..e75c6e0033 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -97,7 +97,7 @@ Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) { if (!stream) continue; - audioStream = _supportedCodecs[i].streamFunc(stream, true); + audioStream = _supportedCodecs[i].streamFunc(stream, DisposeAfterUse::YES); break; } @@ -241,12 +241,12 @@ namespace { // A simple wrapper to create VOC streams the way like creating MP3, OGG/Vorbis and FLAC streams. // Possible TODO: Think of making this complete and moving it to sound/voc.cpp ? -Audio::SeekableAudioStream *makeVOCStream(Common::SeekableReadStream *stream, bool disposeAfterUse) { +Audio::SeekableAudioStream *makeVOCStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) { #ifdef STREAM_AUDIO_FROM_DISK Audio::SeekableAudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED, disposeAfterUse); #else - Audio::SeekableAudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED, false); + Audio::SeekableAudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED, DisposeAfterUse::NO); if (disposeAfterUse) delete stream; diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index ae0510853a..9cba030a13 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -243,7 +243,7 @@ private: const char *fileext; Audio::SeekableAudioStream *(*streamFunc)( Common::SeekableReadStream *stream, - bool disposeAfterUse); + DisposeAfterUse::Flag disposeAfterUse); }; static const SpeechCodecs _supportedCodecs[]; @@ -358,7 +358,7 @@ private: const char *fileext; Audio::SeekableAudioStream *(*streamFunc)( Common::SeekableReadStream *stream, - bool disposeAfterUse); + DisposeAfterUse::Flag disposeAfterUse); }; static const AudioCodecs _supportedCodecs[]; diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index 84b18ebc33..314d45299a 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -460,7 +460,7 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer:: strncpy(use->filename, filename, sizeof(use->filename)); use->priority = priority; - Audio::SeekableAudioStream *audioStream = _supportedCodecs[usedCodec].streamFunc(stream, true); + Audio::SeekableAudioStream *audioStream = _supportedCodecs[usedCodec].streamFunc(stream, DisposeAfterUse::YES); if (!audioStream) { warning("Couldn't create audio stream for file '%s'", filename); return -1; @@ -522,7 +522,7 @@ void SoundDigital::beginFadeOut(int channel, int ticks) { namespace { -Audio::SeekableAudioStream *makeAUDStream(Common::SeekableReadStream *stream, bool disposeAfterUse) { +Audio::SeekableAudioStream *makeAUDStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) { return new AUDStream(stream); } |