From e2463f77cdc4a11038843668988b388d03f06477 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 6 Jan 2009 10:40:38 +0000 Subject: Changed sfGetSoundEnergy to use the correct soundEnergy value from decompressing sounds for proper lip-sync svn-id: r35751 --- engines/made/sound.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/made/sound.cpp') diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp index 98426ea20b..a88274f205 100644 --- a/engines/made/sound.cpp +++ b/engines/made/sound.cpp @@ -30,6 +30,8 @@ namespace Made { +int soundEnergy = 0; + void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCount) { int16 prevSample = 0, workSample = 0; @@ -67,6 +69,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou case 0: memset(soundBuffer, 0x80, workChunkSize); workSample = 0; + soundEnergy = 0; break; case 1: @@ -93,12 +96,14 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou } } + soundEnergy = type - 1; break; case 5: for (i = 0; i < workChunkSize; i++) soundBuffer[i] = *source++; workSample = soundBuffer[workChunkSize - 1] - 128; + soundEnergy = 4; break; default: -- cgit v1.2.3