aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders
diff options
context:
space:
mode:
authorJohannes Schickel2011-11-24 22:54:19 +0100
committerJohannes Schickel2011-11-24 22:55:25 +0100
commitdd42278373484b536e61a93fec578b1a2cadd11d (patch)
tree7008f7aaad3d3c7240ab4ea2a91cc0fb071bcac7 /audio/decoders
parent672e981b17610d7b8403fccbb8757fae05ade3b5 (diff)
downloadscummvm-rg350-dd42278373484b536e61a93fec578b1a2cadd11d.tar.gz
scummvm-rg350-dd42278373484b536e61a93fec578b1a2cadd11d.tar.bz2
scummvm-rg350-dd42278373484b536e61a93fec578b1a2cadd11d.zip
AUDIO: Fix type 9 sound blocks in VOC code.
This should fix missing sound in Touche.
Diffstat (limited to 'audio/decoders')
-rw-r--r--audio/decoders/voc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp
index 69a9733b1a..06a0b845a0 100644
--- a/audio/decoders/voc.cpp
+++ b/audio/decoders/voc.cpp
@@ -365,10 +365,6 @@ void VocStream::preProcess() {
_blocks.erase(lastBlock);
}
}
-
- // Check whether we found a new highest rate
- if (_rate < block.sampleBlock.rate)
- _rate = block.sampleBlock.rate;
} else {
block.sampleBlock.rate = _stream->readUint32LE();
int bitsPerSample = _stream->readByte();
@@ -381,7 +377,7 @@ void VocStream::preProcess() {
warning("Unhandled channel count %d in VOC file", channels);
return;
}
- int codec = _stream->readByte();
+ int codec = _stream->readUint16LE();
// We only support 8bit PCM
if (codec != 0) {
warning("Unhandled codec %d in VOC file", codec);
@@ -391,6 +387,10 @@ void VocStream::preProcess() {
block.sampleBlock.offset = _stream->pos();
block.sampleBlock.samples = skip = block.length - 12;
}
+
+ // Check whether we found a new highest rate
+ if (_rate < block.sampleBlock.rate)
+ _rate = block.sampleBlock.rate;
break;
// Silence