[Scummvm-cvs-logs] CVS: residual smush.cpp,1.12,1.13

Pawel Kolodziejski aquadran at users.sourceforge.net
Sun Feb 1 03:30:03 CET 2004


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12865

Modified Files:
	smush.cpp 
Log Message:
use mixer little endian feature

Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- smush.cpp	1 Feb 2004 11:14:47 -0000	1.12
+++ smush.cpp	1 Feb 2004 11:16:54 -0000	1.13
@@ -124,16 +124,13 @@
 extern SoundMixer *g_mixer;
 
 void Smush::handleWave(const byte *src, uint32 size) {
-    
 	int16 *dst = new int16[size * _channels];
 	decompressVima((char *)src, dst, size * _channels * 2);
-	// convert our LE ones to BE
-	for (uint32 j = 0; j < size * _channels; j++)
-		dst[j] = SWAP_BYTES_16(dst[j]);
 
-	int flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE;
+	int flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LITTLE_ENDIAN;
 	if (_channels == 2)
 		flags |= SoundMixer::FLAG_STEREO;
+
 	if (!_soundHandle.isActive())
 		g_mixer->newStream(&_soundHandle, _freq, flags, 500000);
 	g_mixer->appendStream(_soundHandle, (byte *)dst, size * _channels * 2);





More information about the Scummvm-git-logs mailing list