mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-27 19:00:25 -04:00
Change the stack rewind in the end of render to be slightly less fragile, anticipating putting more stuff in the stack.
Specifically, we will soon put the su_sample_offsets and su_delay_times table addresses to stack in the render_samples, to avoid hard coding them in the api call.
This commit is contained in:
parent
b94bb79366
commit
c7c752cd73
@ -379,11 +379,13 @@ su_render_sampleloop: ; loop through every sample in the row
|
||||
inc eax
|
||||
cmp eax, TOTAL_ROWS
|
||||
jl su_render_rowloop
|
||||
%ifdef INCLUDE_MULTIVOICE_TRACKS
|
||||
; rewind the stack. Use add when there's a lot to clean, repeated pops if only a little
|
||||
%if su_stack.render_epilogue - su_stack.tick > 3*PTRSIZE
|
||||
add _SP, su_stack.render_epilogue - su_stack.tick ; rewind the remaining tack
|
||||
%else
|
||||
pop _AX
|
||||
pop _AX
|
||||
%rep (su_stack.render_epilogue - su_stack.tick)/PTRSIZE
|
||||
pop _AX ; the entropy of 3 x pop _AX is probably lower than 3 byte add
|
||||
%endrep ; but this needs to be confirmed
|
||||
%endif
|
||||
render_epilogue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user