Skip to content

Commit

Permalink
SCI32: Fix audio dumper decompressed size calculation for 16-bit audio
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Oct 3, 2017
1 parent 88cd54c commit 2203386
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion engines/sci/console.cpp
Expand Up @@ -1507,13 +1507,17 @@ bool Console::cmdAudioDump(int argc, const char **argv) {

// All AudioStreams must output 16-bit samples
bytesPerSample = 2;
decompressedSize = compressedSize * bytesPerSample;

decompressedSize = compressedSize;

if (flags & kCompressed) {
decompressedSize *= 2;
}
if (flags & k16Bit) {
sourceIs8Bit = false;
} else {
// 8-bit is implicitly up-converted by AudioStream to 16-bit
decompressedSize *= 2;
}
if (flags & kStereo) {
numChannels = 2;
Expand Down

0 comments on commit 2203386

Please sign in to comment.