diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/sound.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/music.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp index 59dc6c1151..b3a7f8fc21 100644 --- a/engines/mohawk/sound.cpp +++ b/engines/mohawk/sound.cpp @@ -448,7 +448,7 @@ Audio::AudioStream *Sound::makeMohawkWaveStream(Common::SeekableReadStream *stre } else if (data_chunk.encoding == kCodecMPEG2) { #ifdef USE_MAD Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(data_chunk.audio_data, data_chunk.size, Common::DisposeAfterUse::YES); - return Audio::makeMP3Stream(dataStream, true, 0, 0, !loop); + return Audio::makeLoopingAudioStream(Audio::makeMP3Stream(dataStream, true), loop ? 0 : 1); #else warning ("MAD library not included - unable to play MP2 audio"); #endif diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp index 783900c598..dd86f27f43 100644 --- a/engines/sword1/music.cpp +++ b/engines/sword1/music.cpp @@ -177,7 +177,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.flac", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeFlacStream(&_file, false, 0, 0, loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, false), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -186,7 +186,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.fla", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeFlacStream(&_file, false, 0, 0, loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeFlacStream(&_file, false), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -196,7 +196,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.ogg", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeVorbisStream(&_file, false, 0, 0, loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeVorbisStream(&_file, false), loop ? 0 : 1); if (!_audioSource) _file.close(); } @@ -206,7 +206,7 @@ bool MusicHandle::play(const char *fileBase, bool loop) { if (!_audioSource) { sprintf(fileName, "%s.mp3", fileBase); if (_file.open(fileName)) { - _audioSource = Audio::makeMP3Stream(&_file, false, 0, 0, loop ? 0 : 1); + _audioSource = Audio::makeLoopingAudioStream(Audio::makeMP3Stream(&_file, false), loop ? 0 : 1); if (!_audioSource) _file.close(); } |