diff options
author | Matthew Hoops | 2014-01-09 21:28:43 -0500 |
---|---|---|
committer | Matthew Hoops | 2014-01-11 18:43:42 -0500 |
commit | ce82977ea152ea617b2e6c005b2bcfedb2a0e85c (patch) | |
tree | 2c8298722ae550a93e382fa827e18a1ff6d3a2d1 /video | |
parent | d2e31c8d67417d033b89cabc834cf3a1c363799c (diff) | |
download | scummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.tar.gz scummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.tar.bz2 scummvm-rg350-ce82977ea152ea617b2e6c005b2bcfedb2a0e85c.zip |
VIDEO: Improve support for multiple Bink audio tracks
Diffstat (limited to 'video')
-rw-r--r-- | video/bink_decoder.cpp | 10 | ||||
-rw-r--r-- | video/bink_decoder.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 45dec0887b..bad34e8373 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -214,6 +214,16 @@ void BinkDecoder::readNextPacket() { frame.bits = 0; } +VideoDecoder::AudioTrack *BinkDecoder::getAudioTrack(int index) { + // Bink audio track indexes are relative to the first audio track + Track *track = getTrack(index + 1); + + if (!track || track->getTrackType() != Track::kTrackTypeAudio) + return 0; + + return (AudioTrack *)track; +} + BinkDecoder::VideoFrame::VideoFrame() : bits(0) { } diff --git a/video/bink_decoder.h b/video/bink_decoder.h index 08800c2223..fb2998fb6e 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -74,6 +74,8 @@ public: protected: void readNextPacket(); + bool supportsAudioTrackSwitching() const { return true; } + AudioTrack *getAudioTrack(int index); private: static const int kAudioChannelsMax = 2; |