From ec49730711399c7705211f76bf583ad73a681e16 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Mon, 10 Jul 2017 21:36:19 +0200 Subject: VIDEO: Allow setting the mixer sound type used to play audio tracks --- engines/access/video/movie_decoder.cpp | 7 ++++--- engines/access/video/movie_decoder.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/access') diff --git a/engines/access/video/movie_decoder.cpp b/engines/access/video/movie_decoder.cpp index 1406e549ad..2b64af6267 100644 --- a/engines/access/video/movie_decoder.cpp +++ b/engines/access/video/movie_decoder.cpp @@ -152,7 +152,7 @@ bool AccessVIDMovieDecoder::loadStream(Common::SeekableReadStream *stream) { soundblasterRate = _stream->readByte(); audioSampleRate = 1000000 / (256 - soundblasterRate); - _audioTrack = new StreamAudioTrack(audioSampleRate); + _audioTrack = new StreamAudioTrack(audioSampleRate, getSoundType()); addTrack(_audioTrack); _stream->seek(chunkStartOffset); // seek back @@ -194,7 +194,7 @@ bool AccessVIDMovieDecoder::loadStream(Common::SeekableReadStream *stream) { // If sample rate was found, create an audio track if (audioSampleRate) { - _audioTrack = new StreamAudioTrack(audioSampleRate); + _audioTrack = new StreamAudioTrack(audioSampleRate, getSoundType()); addTrack(_audioTrack); } @@ -641,7 +641,8 @@ bool AccessVIDMovieDecoder::StreamVideoTrack::hasDirtyPalette() const { return _dirtyPalette; } -AccessVIDMovieDecoder::StreamAudioTrack::StreamAudioTrack(uint32 sampleRate) { +AccessVIDMovieDecoder::StreamAudioTrack::StreamAudioTrack(uint32 sampleRate, Audio::Mixer::SoundType soundType) : + AudioTrack(soundType) { _totalAudioQueued = 0; // currently 0 milliseconds queued _sampleRate = sampleRate; diff --git a/engines/access/video/movie_decoder.h b/engines/access/video/movie_decoder.h index 8b5d94836b..54b40e83bb 100644 --- a/engines/access/video/movie_decoder.h +++ b/engines/access/video/movie_decoder.h @@ -119,7 +119,7 @@ private: class StreamAudioTrack : public AudioTrack { public: - StreamAudioTrack(uint32 sampleRate); + StreamAudioTrack(uint32 sampleRate, Audio::Mixer::SoundType soundType); ~StreamAudioTrack(); void queueAudio(Common::SeekableReadStream *stream, byte chunkId); -- cgit v1.2.3