From 50a9c6429d81b002c10d0ac05cabbc492716f180 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 10 Apr 2012 09:31:55 +0100 Subject: AUDIO: Update to QDM2 codec fixing pointer to stream buffer usage. This should allow the QDM2 codec to work again with Common::Bitstream instead of the older getBits() reader, but this aborts with a reading past end of stream error... --- audio/decoders/qdm2.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'audio/decoders') diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp index ab71f1ca85..0d4e0d1c50 100644 --- a/audio/decoders/qdm2.cpp +++ b/audio/decoders/qdm2.cpp @@ -2576,8 +2576,7 @@ void QDM2Stream::qdm2_decode_super_block(void) { if (header.type == 0x7f) header.type |= (gb->getBits(8) << 8); - // FIXME: Replace internal bitstream buffer usage - //header.data = &gb->buffer[gb->size() / 8]; + header.data = &_compressedData[gb->pos() / 8]; } if (header.type < 2 || header.type >= 8) { @@ -2652,8 +2651,7 @@ void QDM2Stream::qdm2_decode_super_block(void) { if (packet->type == 0x7f) packet->type |= (gb->getBits(8) << 8); - // FIXME: Replace internal bitstream buffer usage - //packet->data = &gb->buffer[gb->size() / 8]; + packet->data = &header.data[gb->pos() / 8]; } next_index = packet->size + gb->pos() / 8; -- cgit v1.2.3