diff options
author | Johannes Schickel | 2010-01-10 15:20:14 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-10 15:20:14 +0000 |
commit | 6ca0570fe3bb3f3765677ff8cd3f9e0cbf062d6b (patch) | |
tree | 732a2cc846d6f70dd2c42b0dc0cd52d45de34bb2 /engines/sci/sound/audio.cpp | |
parent | bda3fc940c3ecca011b04a32fb20970f53f49d1c (diff) | |
download | scummvm-rg350-6ca0570fe3bb3f3765677ff8cd3f9e0cbf062d6b.tar.gz scummvm-rg350-6ca0570fe3bb3f3765677ff8cd3f9e0cbf062d6b.tar.bz2 scummvm-rg350-6ca0570fe3bb3f3765677ff8cd3f9e0cbf062d6b.zip |
- Add a SubLoopingAudioStream, which loops a nested part of a stream and thus features the same looping capabilites as LinearMemoryStream and LinearDiskStream.
- Remove custom looping code from LinearMemoryStream and LinearDiskStream.
- Adapt various client code to the changes.
svn-id: r47226
Diffstat (limited to 'engines/sci/sound/audio.cpp')
-rw-r--r-- | engines/sci/sound/audio.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 5a4f7aeafc..4011aa9fa3 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -243,10 +243,9 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32 } } - if (data) { - audioStream = Audio::makeLinearInputStream(data, size, _audioRate, - flags | Audio::Mixer::FLAG_AUTOFREE, 0, 0); - } + if (data) + audioStream = Audio::makeLinearInputStream(data, size, _audioRate, flags | Audio::Mixer::FLAG_AUTOFREE); + if (audioStream) { *sampleLen = (flags & Audio::Mixer::FLAG_16BITS ? size >> 1 : size) * 60 / _audioRate; return audioStream; |