[SDL] [patch] Volume multiplier bug in SDL_MixAudio_MMX_S8()

Alex Volkov avcp-sdlmail at usa.net
Tue Sep 27 12:22:07 PDT 2005


 
Evidently, the mechanically-converted MSVC version of the same code suffers
from the same problem (wrong register). Patch follows.

Index: SDL_mixer_MMX_VC.c
===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/audio/SDL_mixer_MMX_VC.c,v
retrieving revision 1.3
diff -u -p -r1.3 SDL_mixer_MMX_VC.c
--- SDL_mixer_MMX_VC.c	17 Apr 2005 10:27:00 -0000	1.3
+++ SDL_mixer_MMX_VC.c	27 Sep 2005 19:08:47 -0000
@@ -107,7 +107,7 @@ void SDL_MixAudio_MMX_S8_VC(char* dst,ch
 		mov		esi, src	//%1,%%esi	// esi = src
 		mov		eax, volume	//%3,%%eax	// eax =
volume
 
-		movd	mm0, ebx	//%%ebx,%%mm0
+		movd	mm0, eax	//%%eax,%%mm0
 		movq	mm1, mm0	//%%mm0,%%mm1
 		psllq	mm0, 16		//$16,%%mm0
 		por		mm0, mm1	//%%mm1,%%mm0






More information about the SDL mailing list