[Scummvm-cvs-logs] SF.net SVN: scummvm:[43576] scummvm/trunk/engines/sci/sfx/core.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Fri Aug 21 05:31:34 CEST 2009
Revision: 43576
http://scummvm.svn.sourceforge.net/scummvm/?rev=43576&view=rev
Author: mthreepwood
Date: 2009-08-21 03:31:34 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Truly fix endianness in the SOL decoder. Raw sounds are always in little endian order and now compressed are outputted to little endian too (and therefore the little endian mixer flag is always set).
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/core.cpp
Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp 2009-08-21 00:00:28 UTC (rev 43575)
+++ scummvm/trunk/engines/sci/sfx/core.cpp 2009-08-21 03:31:34 UTC (rev 43576)
@@ -1070,7 +1070,7 @@
else
s += tableDPCM8[b & 7];
s = CLIP<int32>(s, 0, 255);
- *soundBuf = s;
+ *soundBuf = TO_LE_16(s);
}
static void deDPCM8(byte *soundBuf, Common::SeekableReadStream &audioStream, uint32 n) {
@@ -1105,13 +1105,9 @@
// Convert the SOL stream flags to our own format
flags = 0;
- if (audioFlags & kSolFlag16Bit) {
- flags |= Audio::Mixer::FLAG_16BITS;
-#ifdef SCUMM_LITTLE_ENDIAN
- flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
-#endif
- }
-
+ if (audioFlags & kSolFlag16Bit)
+ flags |= Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN;
+
if (!(audioFlags & kSolFlagIsSigned))
flags |= Audio::Mixer::FLAG_UNSIGNED;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list