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 | |
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')
-rw-r--r-- | engines/sci/sound/audio.cpp | 7 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 3 |
2 files changed, 4 insertions, 6 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; diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 1bb4fa883f..4b452aad56 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -303,8 +303,7 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) { if (track->digitalChannelNr != -1) { byte *channelData = track->channels[track->digitalChannelNr].data; delete pSnd->pStreamAud; - pSnd->pStreamAud = Audio::makeLinearInputStream(channelData, track->digitalSampleSize, track->digitalSampleRate, - Audio::Mixer::FLAG_UNSIGNED, 0, 0); + pSnd->pStreamAud = Audio::makeLinearInputStream(channelData, track->digitalSampleSize, track->digitalSampleRate, Audio::Mixer::FLAG_UNSIGNED); delete pSnd->pLoopStream; pSnd->pLoopStream = 0; pSnd->soundType = Audio::Mixer::kSFXSoundType; |