Make sound processing use less CPU cycles.

This commit is contained in:
n-a-c-h
2005-11-26 17:11:07 +00:00
parent db6aa710f7
commit b80ce23ef6

View File

@@ -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