mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-03 09:08:18 -04:00
Optimize the implementations of gain and invgain.
This commit is contained in:
parent
ac5b4dd496
commit
6a0a2fc36c
@ -84,18 +84,19 @@ su_op_hold_holding:
|
|||||||
%if GAIN_ID > -1
|
%if GAIN_ID > -1
|
||||||
|
|
||||||
SECT_TEXT(sugain)
|
SECT_TEXT(sugain)
|
||||||
|
%ifdef INCLUDE_STEREO_GAIN
|
||||||
EXPORT MANGLE_FUNC(su_op_gain,0)
|
EXPORT MANGLE_FUNC(su_op_gain,0)
|
||||||
%ifdef INCLUDE_STEREO_GAIN
|
fld dword [edx+su_gain_ports.gain] ; g l (r)
|
||||||
jnc su_op_gain_mono
|
jnc su_op_gain_mono
|
||||||
call su_stereo_filterhelper
|
fmul st2, st0 ; g l r/g
|
||||||
%define INCLUDE_STEREO_FILTERHELPER
|
su_op_gain_mono:
|
||||||
su_op_gain_mono:
|
fmulp st1, st0 ; l/g (r/)
|
||||||
%endif
|
ret
|
||||||
fld dword [edx+su_gain_ports.gain] ; g x
|
%else
|
||||||
fmulp st1, st0 ; g*x
|
EXPORT MANGLE_FUNC(su_op_gain,0)
|
||||||
ret
|
fmul dword [edx+su_gain_ports.gain]
|
||||||
|
ret
|
||||||
|
%endif
|
||||||
%endif ; GAIN_ID > -1
|
%endif ; GAIN_ID > -1
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
@ -104,19 +105,20 @@ su_op_gain_mono:
|
|||||||
%if INVGAIN_ID > -1
|
%if INVGAIN_ID > -1
|
||||||
|
|
||||||
SECT_TEXT(suingain)
|
SECT_TEXT(suingain)
|
||||||
|
%ifdef INCLUDE_STEREO_INVGAIN
|
||||||
EXPORT MANGLE_FUNC(su_op_invgain,0)
|
EXPORT MANGLE_FUNC(su_op_invgain,0)
|
||||||
%ifdef INCLUDE_STEREO_INVGAIN
|
fld dword [edx+su_invgain_ports.invgain] ; g l (r)
|
||||||
jnc su_op_invgain_mono
|
jnc su_op_invgain_mono
|
||||||
call su_stereo_filterhelper
|
fdiv st2, st0 ; g l r/g
|
||||||
%define INCLUDE_STEREO_FILTERHELPER
|
su_op_invgain_mono:
|
||||||
su_op_invgain_mono:
|
fdivp st1, st0 ; l/g (r/)
|
||||||
%endif
|
ret
|
||||||
fld dword [edx+su_invgain_ports.invgain] ; g x
|
%else
|
||||||
fdivp st1, st0 ; x/g
|
EXPORT MANGLE_FUNC(su_op_invgain,0)
|
||||||
ret
|
fdiv dword [edx+su_invgain_ports.invgain]
|
||||||
|
ret
|
||||||
%endif ; INVINVGAIN_ID > -1
|
%endif
|
||||||
|
%endif ; INVGAIN_ID > -1
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
; su_op_filter: perform low/high/band-pass filtering on the signal
|
; su_op_filter: perform low/high/band-pass filtering on the signal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user