mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-10 01:30:11 -05:00
Move things to stack, anticipating support for multicore rendering.
This commit is contained in:
@ -416,11 +416,6 @@ su_op_delay_loop:
|
||||
;-------------------------------------------------------------------------------
|
||||
; Delay data
|
||||
;-------------------------------------------------------------------------------
|
||||
SECT_BSS(sudelbuf)
|
||||
|
||||
EXPORT MANGLE_DATA(su_delay_buffer)
|
||||
resb NUM_DELAY_LINES*su_delayline_wrk.size
|
||||
|
||||
SECT_DATA(suconst)
|
||||
|
||||
%ifndef C_DC_CONST
|
||||
|
||||
@ -17,7 +17,7 @@ EXPORT MANGLE_FUNC(su_op_advance,0) ; Stack: addr voice wrkptr valptr comptr
|
||||
add WRK, su_voice.size ; move to next voice
|
||||
mov [_SP+su_stack.wrk], WRK ; update stack
|
||||
mov ecx, [_SP+su_stack.voiceno] ; ecx = voice
|
||||
apply bt dword,su_polyphony_bitmask,{,ecx} ; if voice bit of su_polyphonism not set
|
||||
bt dword [_SP+su_stack.polyphony], ecx ; if voice bit of su_polyphonism not set
|
||||
jnc su_op_advance_next_instrument ; goto next_instrument
|
||||
mov VAL, PTRWORD [_SP+su_stack.val] ; rollback to where we were earlier
|
||||
mov COM, PTRWORD [_SP+su_stack.com]
|
||||
|
||||
@ -9,16 +9,16 @@
|
||||
SECT_TEXT(suopout)
|
||||
|
||||
EXPORT MANGLE_FUNC(su_op_out,0) ; l r
|
||||
mov _AX, PTRWORD su_synth_obj + su_synth.left
|
||||
mov _AX, [_SP + su_stack.synth]
|
||||
%ifdef INCLUDE_STEREO_OUT
|
||||
jnc su_op_out_mono
|
||||
call su_op_out_mono
|
||||
add _AX, 4
|
||||
su_op_out_mono:
|
||||
%endif
|
||||
fmul dword [INP+su_out_ports.gain] ; g*l
|
||||
fadd dword [_AX] ; g*l+o
|
||||
fstp dword [_AX] ; o'=g*l+o
|
||||
fmul dword [INP + su_out_ports.gain] ; g*l
|
||||
fadd dword [_AX + su_synth.left] ; g*l+o
|
||||
fstp dword [_AX + su_synth.left] ; o'=g*l+o
|
||||
ret
|
||||
|
||||
%endif ; SU_OUT_ID > -1
|
||||
@ -51,7 +51,7 @@ su_op_send_mono:
|
||||
%ifdef INCLUDE_GLOBAL_SEND
|
||||
test _AX, SEND_GLOBAL
|
||||
jz su_op_send_skipglobal
|
||||
mov _CX, PTRWORD su_synth_obj
|
||||
mov _CX, [_SP + su_stack.synth]
|
||||
su_op_send_skipglobal:
|
||||
%endif
|
||||
test _AX, SEND_POP ; if the SEND_POP bit is not set
|
||||
|
||||
@ -75,12 +75,16 @@ kmENV_func_leave2:
|
||||
SECT_TEXT(sunoise)
|
||||
|
||||
EXPORT MANGLE_FUNC(su_op_noise,0)
|
||||
mov _CX,_SP
|
||||
%ifdef INCLUDE_STEREO_NOISE
|
||||
jnc su_op_noise_mono
|
||||
call su_op_noise_mono
|
||||
su_op_noise_mono:
|
||||
%endif
|
||||
call MANGLE_FUNC(FloatRandomNumber,0)
|
||||
imul eax, [_CX + su_stack.randseed],16007
|
||||
mov [_CX + su_stack.randseed],eax
|
||||
fild dword [_CX + su_stack.randseed]
|
||||
apply fidiv dword,c_RandDiv
|
||||
fld dword [INP+su_noise_ports.shape]
|
||||
call su_waveshaper
|
||||
fld dword [INP+su_noise_ports.gain]
|
||||
|
||||
Reference in New Issue
Block a user