mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(amd64-386): crash with sample-based oscillator in 32-bit library
This commit is contained in:
parent
0e10cd2ae8
commit
ce673578fd
@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
the command line tools.
|
the command line tools.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Crashes with sample-based oscillators in the 32-bit library, as the pointer to
|
||||||
|
sample-table (edi) got accidentally overwritten by detune
|
||||||
- Sample-based oscillators could hard crash if a x87 stack overflow happened
|
- Sample-based oscillators could hard crash if a x87 stack overflow happened
|
||||||
when calculating the current position in the sample ([#149][i149])
|
when calculating the current position in the sample ([#149][i149])
|
||||||
- Numeric updown widget calculated dp-to-px conversion incorrectly, resulting in
|
- Numeric updown widget calculated dp-to-px conversion incorrectly, resulting in
|
||||||
|
@ -127,6 +127,9 @@ su_op_oscillat_mono:
|
|||||||
{{- end}}
|
{{- end}}
|
||||||
{{- if .SupportsParamValueOtherThan "oscillator" "unison" 0}}
|
{{- if .SupportsParamValueOtherThan "oscillator" "unison" 0}}
|
||||||
{{.PushRegs .AX "" .WRK "OscWRK" .AX "OscFlags"}}
|
{{.PushRegs .AX "" .WRK "OscWRK" .AX "OscFlags"}}
|
||||||
|
{{- if and (not .Amd64) .Library}}
|
||||||
|
push {{.AX}} ; pushregs is pushad in 32-bit, and pushes edi last, so decrease SP because library needs to save edi and we can store detune there
|
||||||
|
{{- end}}
|
||||||
fldz ; 0 d
|
fldz ; 0 d
|
||||||
fxch ; d a=0, "accumulated signal"
|
fxch ; d a=0, "accumulated signal"
|
||||||
su_op_oscillat_unison_loop:
|
su_op_oscillat_unison_loop:
|
||||||
@ -147,6 +150,9 @@ su_op_oscillat_unison_loop:
|
|||||||
dec eax
|
dec eax
|
||||||
jmp short su_op_oscillat_unison_loop
|
jmp short su_op_oscillat_unison_loop
|
||||||
su_op_oscillat_unison_out:
|
su_op_oscillat_unison_out:
|
||||||
|
{{- if and (not .Amd64) .Library}}
|
||||||
|
pop {{.AX}} ; pushregs is pushad in 32-bit, and pushes edi last, so we inscrease SP to avoid destroying edi
|
||||||
|
{{- end}}
|
||||||
{{.PopRegs .AX .WRK .AX}}
|
{{.PopRegs .AX .WRK .AX}}
|
||||||
ret
|
ret
|
||||||
su_op_oscillat_single:
|
su_op_oscillat_single:
|
||||||
|
Loading…
Reference in New Issue
Block a user