[Scummvm-cvs-logs] scummvm master -> dd42278373484b536e61a93fec578b1a2cadd11d

lordhoto lordhoto at gmail.com
Thu Nov 24 22:55:52 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dd42278373 AUDIO: Fix type 9 sound blocks in VOC code.


Commit: dd42278373484b536e61a93fec578b1a2cadd11d
    https://github.com/scummvm/scummvm/commit/dd42278373484b536e61a93fec578b1a2cadd11d
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-11-24T13:55:25-08:00

Commit Message:
AUDIO: Fix type 9 sound blocks in VOC code.

This should fix missing sound in Touche.

Changed paths:
    audio/decoders/voc.cpp



diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp
index 69a9733..06a0b84 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






More information about the Scummvm-git-logs mailing list