From b80ce23ef6a23a355b27089b9e32842b0c4c6584 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sat, 26 Nov 2005 17:11:07 +0000 Subject: [PATCH] Make sound processing use less CPU cycles. --- zsnes/src/linux/sdlintrf.asm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/zsnes/src/linux/sdlintrf.asm b/zsnes/src/linux/sdlintrf.asm index 315f48c6..37cbf54f 100644 --- a/zsnes/src/linux/sdlintrf.asm +++ b/zsnes/src/linux/sdlintrf.asm @@ -1074,24 +1074,20 @@ NEWSYM StartSound call JoyRead ret - NEWSYM SoundProcess ; This function is called ~60 times/s at full speed - pushad cmp byte[soundon],0 je .nosound cmp byte[DSPDisable],1 je .nosound - mov eax,256 ; Size - mov [BufferSizeB],eax - add eax,eax - mov [BufferSizeW],eax + mov dword[BufferSizeB],256 + mov dword[BufferSizeW],512 pushad call ProcessSoundBuffer popad + ; DSPBuffer should contain the processed buffer in the specified size ; You will have to convert/clip it to 16-bit for actual sound process .nosound - popad ret NEWSYM delay