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/sword1 | |
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/sword1')
-rw-r--r-- | engines/sword1/music.cpp | 10 | ||||
-rw-r--r-- | engines/sword1/sound.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp index de5906713e..9d74e6a3f2 100644 --- a/engines/sword1/music.cpp +++ b/engines/sword1/music.cpp @@ -62,7 +62,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.flac", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, false), loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, DisposeAfterUse::NO), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -71,7 +71,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.fla", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, false), loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, DisposeAfterUse::NO), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -81,7 +81,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.ogg", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeLoopingAudioStream(Audio::makeVorbisStream(&_file, false), loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeVorbisStream(&_file, DisposeAfterUse::NO), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -91,7 +91,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.mp3", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeLoopingAudioStream(Audio::makeMP3Stream(&_file, false), loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeMP3Stream(&_file, DisposeAfterUse::NO), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -100,7 +100,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.wav", fileBase); if (_file.open(fileName)) - _audioSource = Audio::makeLoopingAudioStream(Audio::makeWAVStream(&_file, false), loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeWAVStream(&_file, DisposeAfterUse::NO), loop ? 0 : 1); } if (!_audioSource) { diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 98b87d56ea..b3671791a1 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -371,7 +371,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { _cowFile.seek(index); Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeFlacStream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeFlacStream(tmp, DisposeAfterUse::YES), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -384,7 +384,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { _cowFile.seek(index); Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeVorbisStream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeVorbisStream(tmp, DisposeAfterUse::YES), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -397,7 +397,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { _cowFile.seek(index); Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(tmp, DisposeAfterUse::YES), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) |