diff options
author | Max Horn | 2010-01-08 22:10:19 +0000 |
---|---|---|
committer | Max Horn | 2010-01-08 22:10:19 +0000 |
commit | c4892593538887d36858cbba609dbe34a4b60792 (patch) | |
tree | e4706acc9612b33677a1ab6ef03e3769ad12f347 | |
parent | f720d99b0a4fdc97d4d5c01b8c4db43c318c62b1 (diff) | |
download | scummvm-rg350-c4892593538887d36858cbba609dbe34a4b60792.tar.gz scummvm-rg350-c4892593538887d36858cbba609dbe34a4b60792.tar.bz2 scummvm-rg350-c4892593538887d36858cbba609dbe34a4b60792.zip |
Switch SCUMM from AppendableAudioStream to QueuingAudioStream
svn-id: r47183
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.h | 2 | ||||
-rw-r--r-- | engines/scumm/smush/smush_mixer.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/smush/smush_mixer.h | 2 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.h | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index 43e0148b00..7672587904 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -202,7 +202,7 @@ void IMuseDigital::saveOrLoad(Serializer *ser) { track->mixerFlags |= kFlagLittleEndian; #endif - track->stream = Audio::makeAppendableAudioStream(freq, makeMixerFlags(track->mixerFlags)); + track->stream = Audio::makeQueuingAudioStream(freq, track->mixerFlags & kFlagStereo); _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan()); _mixer->pauseHandle(track->mixChanHandle, true); @@ -344,7 +344,7 @@ void IMuseDigital::callback() { curFeedSize = feedSize; if (_mixer->isReady()) { - track->stream->queueBuffer(tmpSndBufferPtr, curFeedSize); + track->stream->queueBuffer(tmpSndBufferPtr, curFeedSize, makeMixerFlags(track->mixerFlags)); track->regionOffset += curFeedSize; } else delete[] tmpSndBufferPtr; diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index a389c0e7e7..58ae48d330 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -172,7 +172,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->dataMod12Bit = otherTrack->dataMod12Bit; } - track->stream = Audio::makeAppendableAudioStream(freq, makeMixerFlags(track->mixerFlags)); + track->stream = Audio::makeQueuingAudioStream(freq, track->mixerFlags & kFlagStereo); _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan()); } @@ -372,7 +372,7 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { fadeTrack->volFadeUsed = true; // Create an appendable output buffer - fadeTrack->stream = Audio::makeAppendableAudioStream(_sound->getFreq(fadeTrack->soundDesc), makeMixerFlags(fadeTrack->mixerFlags)); + fadeTrack->stream = Audio::makeQueuingAudioStream(_sound->getFreq(fadeTrack->soundDesc), track->mixerFlags & kFlagStereo); _mixer->playInputStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan()); fadeTrack->used = true; diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h index c2ed64a556..e3daf37b8b 100644 --- a/engines/scumm/imuse_digi/dimuse_track.h +++ b/engines/scumm/imuse_digi/dimuse_track.h @@ -76,7 +76,7 @@ struct Track { ImuseDigiSndMgr::SoundDesc *soundDesc; // sound handle used by iMuse sound manager Audio::SoundHandle mixChanHandle; // sound mixer's channel handle - Audio::AppendableAudioStream *stream; // sound mixer's audio stream handle for *.la1 and *.bun + Audio::QueuingAudioStream *stream; // sound mixer's audio stream handle for *.la1 and *.bun Track() : soundId(-1), used(false), stream(NULL) { } diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp index 0a0cda5b76..c069f6fe1b 100644 --- a/engines/scumm/smush/smush_mixer.cpp +++ b/engines/scumm/smush/smush_mixer.cpp @@ -122,12 +122,12 @@ bool SmushMixer::handleFrame() { if (_mixer->isReady()) { // Stream the data if (!_channels[i].stream) { - _channels[i].stream = Audio::makeAppendableAudioStream(_channels[i].chan->getRate(), flags); + _channels[i].stream = Audio::makeQueuingAudioStream(_channels[i].chan->getRate(), stereo); _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream); } _mixer->setChannelVolume(_channels[i].handle, vol); _mixer->setChannelBalance(_channels[i].handle, pan); - _channels[i].stream->queueBuffer(data, size); // The stream will free the buffer for us + _channels[i].stream->queueBuffer(data, size, flags); // The stream will free the buffer for us } else delete[] data; } diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h index 0bf6de2762..c7a7354511 100644 --- a/engines/scumm/smush/smush_mixer.h +++ b/engines/scumm/smush/smush_mixer.h @@ -44,7 +44,7 @@ private: int id; SmushChannel *chan; Audio::SoundHandle handle; - Audio::AppendableAudioStream *stream; + Audio::QueuingAudioStream *stream; } _channels[NUM_CHANNELS]; int _soundFrequency; diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 225d7573bf..df7b97a9af 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -469,10 +469,10 @@ void SmushPlayer::handleIACT(int32 subSize, Common::SeekableReadStream &b) { } while (--count); if (!_IACTstream) { - _IACTstream = Audio::makeAppendableAudioStream(22050, Audio::Mixer::FLAG_STEREO | Audio::Mixer::FLAG_16BITS); + _IACTstream = Audio::makeQueuingAudioStream(22050, true); _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_IACTchannel, _IACTstream); } - _IACTstream->queueBuffer(output_data, 0x1000); + _IACTstream->queueBuffer(output_data, 0x1000, Audio::Mixer::FLAG_STEREO | Audio::Mixer::FLAG_16BITS); bsize -= len; d_src += len; diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h index f64f56ad4e..af7942c193 100644 --- a/engines/scumm/smush/smush_player.h +++ b/engines/scumm/smush/smush_player.h @@ -65,7 +65,7 @@ private: uint32 _frame; Audio::SoundHandle _IACTchannel; - Audio::AppendableAudioStream *_IACTstream; + Audio::QueuingAudioStream *_IACTstream; Audio::SoundHandle _compressedFileSoundHandle; bool _compressedFileMode; |