[Scummvm-cvs-logs] SF.net SVN: scummvm:[47183] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jan 8 23:10:20 CET 2010
Revision: 47183
http://scummvm.svn.sourceforge.net/scummvm/?rev=47183&view=rev
Author: fingolfin
Date: 2010-01-08 22:10:19 +0000 (Fri, 08 Jan 2010)
Log Message:
-----------
Switch SCUMM from AppendableAudioStream to QueuingAudioStream
Modified Paths:
--------------
scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h
scummvm/trunk/engines/scumm/smush/smush_mixer.cpp
scummvm/trunk/engines/scumm/smush/smush_mixer.h
scummvm/trunk/engines/scumm/smush/smush_player.cpp
scummvm/trunk/engines/scumm/smush/smush_player.h
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp 2010-01-08 22:10:19 UTC (rev 47183)
@@ -202,7 +202,7 @@
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 @@
curFeedSize = feedSize;
if (_mixer->isReady()) {
- track->stream->queueBuffer(tmpSndBufferPtr, curFeedSize);
+ track->stream->queueBuffer(tmpSndBufferPtr, curFeedSize, makeMixerFlags(track->mixerFlags));
track->regionOffset += curFeedSize;
} else
delete[] tmpSndBufferPtr;
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp 2010-01-08 22:10:19 UTC (rev 47183)
@@ -172,7 +172,7 @@
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 @@
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;
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.h 2010-01-08 22:10:19 UTC (rev 47183)
@@ -76,7 +76,7 @@
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) {
}
Modified: scummvm/trunk/engines/scumm/smush/smush_mixer.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_mixer.cpp 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/smush/smush_mixer.cpp 2010-01-08 22:10:19 UTC (rev 47183)
@@ -122,12 +122,12 @@
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;
}
Modified: scummvm/trunk/engines/scumm/smush/smush_mixer.h
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_mixer.h 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/smush/smush_mixer.h 2010-01-08 22:10:19 UTC (rev 47183)
@@ -44,7 +44,7 @@
int id;
SmushChannel *chan;
Audio::SoundHandle handle;
- Audio::AppendableAudioStream *stream;
+ Audio::QueuingAudioStream *stream;
} _channels[NUM_CHANNELS];
int _soundFrequency;
Modified: scummvm/trunk/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.cpp 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/smush/smush_player.cpp 2010-01-08 22:10:19 UTC (rev 47183)
@@ -469,10 +469,10 @@
} 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;
Modified: scummvm/trunk/engines/scumm/smush/smush_player.h
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.h 2010-01-08 22:09:43 UTC (rev 47182)
+++ scummvm/trunk/engines/scumm/smush/smush_player.h 2010-01-08 22:10:19 UTC (rev 47183)
@@ -65,7 +65,7 @@
uint32 _frame;
Audio::SoundHandle _IACTchannel;
- Audio::AppendableAudioStream *_IACTstream;
+ Audio::QueuingAudioStream *_IACTstream;
Audio::SoundHandle _compressedFileSoundHandle;
bool _compressedFileMode;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list