aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/player.h2
-rw-r--r--engines/groovie/roq.cpp24
-rw-r--r--engines/groovie/vdx.cpp4
3 files changed, 15 insertions, 15 deletions
diff --git a/engines/groovie/player.h b/engines/groovie/player.h
index 2ef340149a..d54601bc52 100644
--- a/engines/groovie/player.h
+++ b/engines/groovie/player.h
@@ -52,7 +52,7 @@ protected:
OSystem *_syst;
Common::SeekableReadStream *_file;
uint16 _flags;
- Audio::AppendableAudioStream *_audioStream;
+ Audio::QueuingAudioStream *_audioStream;
private:
// Synchronization stuff
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 5f16f9c935..11e7fd9aaa 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -516,11 +516,7 @@ bool ROQPlayer::processBlockSoundMono(ROQBlockHeader &blockHeader) {
// Initialize the audio stream if needed
if (!_audioStream) {
- byte flags = Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE;
-#ifdef SCUMM_LITTLE_ENDIAN
- flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
-#endif
- _audioStream = Audio::makeAppendableAudioStream(22050, flags);
+ _audioStream = Audio::makeQueuingAudioStream(22050, false);
Audio::SoundHandle sound_handle;
g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream);
}
@@ -544,7 +540,11 @@ bool ROQPlayer::processBlockSoundMono(ROQBlockHeader &blockHeader) {
}
// Queue the read buffer
- _audioStream->queueBuffer((byte *)buffer, blockHeader.size * 2);
+ byte flags = Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE;
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
+#endif
+ _audioStream->queueBuffer((byte *)buffer, blockHeader.size * 2, flags);
return true;
}
@@ -559,11 +559,7 @@ bool ROQPlayer::processBlockSoundStereo(ROQBlockHeader &blockHeader) {
// Initialize the audio stream if needed
if (!_audioStream) {
- byte flags = Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_STEREO;
-#ifdef SCUMM_LITTLE_ENDIAN
- flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
-#endif
- _audioStream = Audio::makeAppendableAudioStream(22050, flags);
+ _audioStream = Audio::makeQueuingAudioStream(22050, true);
Audio::SoundHandle sound_handle;
g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream);
}
@@ -600,7 +596,11 @@ bool ROQPlayer::processBlockSoundStereo(ROQBlockHeader &blockHeader) {
}
// Queue the read buffer
- _audioStream->queueBuffer((byte *)buffer, blockHeader.size * 2);
+ byte flags = Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_STEREO;
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
+#endif
+ _audioStream->queueBuffer((byte *)buffer, blockHeader.size * 2, flags);
return true;
}
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 0c754473fe..e2764defa6 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -498,7 +498,7 @@ void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth
void VDXPlayer::chunkSound(Common::ReadStream *in) {
if (!_audioStream) {
- _audioStream = Audio::makeAppendableAudioStream(22050, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE);
+ _audioStream = Audio::makeQueuingAudioStream(22050, false);
Audio::SoundHandle sound_handle;
g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream);
}
@@ -506,7 +506,7 @@ void VDXPlayer::chunkSound(Common::ReadStream *in) {
byte *data = new byte[60000];
int chunksize = in->read(data, 60000);
if (!Common::isDebugChannelEnabled(kGroovieDebugFast)) {
- _audioStream->queueBuffer(data, chunksize);
+ _audioStream->queueBuffer(data, chunksize, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE);
}
}