aboutsummaryrefslogtreecommitdiff
path: root/video/coktel_decoder.h
diff options
context:
space:
mode:
authorColin Snover2017-08-03 23:48:36 -0500
committerColin Snover2017-08-20 11:36:26 -0500
commit4ba87013a9d9d50a2866fd23aaf39e546bff9b7b (patch)
tree03f91627c367042165da46c21b3bb28fbbea55f1 /video/coktel_decoder.h
parent1d844978d675e1c4d875cc86c9ac86ad0fef04cb (diff)
downloadscummvm-rg350-4ba87013a9d9d50a2866fd23aaf39e546bff9b7b.tar.gz
scummvm-rg350-4ba87013a9d9d50a2866fd23aaf39e546bff9b7b.tar.bz2
scummvm-rg350-4ba87013a9d9d50a2866fd23aaf39e546bff9b7b.zip
VIDEO: Support old-style stereo in VMDs
This format is used by the stereo audio VMDs in Lighthouse.
Diffstat (limited to 'video/coktel_decoder.h')
-rw-r--r--video/coktel_decoder.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h
index b8faa99712..d1189c9394 100644
--- a/video/coktel_decoder.h
+++ b/video/coktel_decoder.h
@@ -43,6 +43,7 @@
namespace Common {
struct Rect;
+class MemoryReadWriteStream;
class SeekableReadStream;
}
namespace Audio {
@@ -503,6 +504,17 @@ private:
AudioFormat _audioFormat;
bool _autoStartSound;
+ /**
+ * Old stereo format packs a DPCM stream into audio packets without ensuring
+ * that each packet contains an even amount of samples. In order for the
+ * stream to play back correctly, all audio data needs to be pushed into a
+ * single data buffer and read from there.
+ *
+ * This buffer is owned by _audioStream and will be disposed when
+ * _audioStream is disposed.
+ */
+ Common::MemoryReadWriteStream *_oldStereoBuffer;
+
// Video properties
bool _hasVideo;
uint32 _videoCodec;
@@ -545,6 +557,7 @@ private:
void emptySoundSlice (uint32 size);
void filledSoundSlice (uint32 size);
void filledSoundSlices(uint32 size, uint32 mask);
+ void createAudioStream();
uint8 evaluateMask(uint32 mask, bool *fillInfo, uint8 &max);