aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/animation.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-10 21:36:19 +0200
committerBastien Bouclet2017-07-27 06:40:07 +0200
commitec49730711399c7705211f76bf583ad73a681e16 (patch)
treecedf79022d82766108a26a589958cf5a43383ca8 /engines/voyeur/animation.cpp
parent22ce8dbf385c08a58222049333554ee206bf933d (diff)
downloadscummvm-rg350-ec49730711399c7705211f76bf583ad73a681e16.tar.gz
scummvm-rg350-ec49730711399c7705211f76bf583ad73a681e16.tar.bz2
scummvm-rg350-ec49730711399c7705211f76bf583ad73a681e16.zip
VIDEO: Allow setting the mixer sound type used to play audio tracks
Diffstat (limited to 'engines/voyeur/animation.cpp')
-rw-r--r--engines/voyeur/animation.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
index d5d58a2fd3..5a5f4c2ad3 100644
--- a/engines/voyeur/animation.cpp
+++ b/engines/voyeur/animation.cpp
@@ -34,7 +34,7 @@ namespace Voyeur {
// Number of audio frames to keep audio track topped up when playing back video
#define SOUND_FRAMES_READAHEAD 3
-RL2Decoder::RL2Decoder(Audio::Mixer::SoundType soundType) : _soundType(soundType) {
+RL2Decoder::RL2Decoder() {
_paletteStart = 0;
_fileStream = nullptr;
_soundFrameNumber = -1;
@@ -76,7 +76,7 @@ bool RL2Decoder::loadStream(Common::SeekableReadStream *stream) {
// Add an audio track if sound is present
_audioTrack = nullptr;
if (_header._soundRate) {
- _audioTrack = new RL2AudioTrack(_header, stream, _soundType);
+ _audioTrack = new RL2AudioTrack(_header, stream, getSoundType());
addTrack(_audioTrack);
}
@@ -433,8 +433,9 @@ Graphics::Surface *RL2Decoder::RL2VideoTrack::getBackSurface() {
/*------------------------------------------------------------------------*/
-RL2Decoder::RL2AudioTrack::RL2AudioTrack(const RL2FileHeader &header, Common::SeekableReadStream *stream, Audio::Mixer::SoundType soundType):
- _header(header), _soundType(soundType) {
+RL2Decoder::RL2AudioTrack::RL2AudioTrack(const RL2FileHeader &header, Common::SeekableReadStream *stream, Audio::Mixer::SoundType soundType) :
+ AudioTrack(soundType),
+ _header(header) {
// Create audio straem for the audio track
_audStream = Audio::makeQueuingAudioStream(_header._rate, _header._channels == 2);
}