diff options
author | Bastien Bouclet | 2017-07-10 21:36:19 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-07-27 06:40:07 +0200 |
commit | ec49730711399c7705211f76bf583ad73a681e16 (patch) | |
tree | cedf79022d82766108a26a589958cf5a43383ca8 /engines/access | |
parent | 22ce8dbf385c08a58222049333554ee206bf933d (diff) | |
download | scummvm-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/access')
-rw-r--r-- | engines/access/video/movie_decoder.cpp | 7 | ||||
-rw-r--r-- | engines/access/video/movie_decoder.h | 2 |
2 files changed, 5 insertions, 4 deletions
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); |