mirror of
				https://github.com/vsariola/sointu.git
				synced 2025-11-03 16:35:57 -05:00 
			
		
		
		
	fix(amd64-386): do not optimize away phase modulations with unisons
This commit is contained in:
		
						parent
						
							012ed10851
						
					
				
				
					commit
					569958547e
				
			@ -189,7 +189,7 @@ su_op_oscillat_normalized:
 | 
			
		||||
    test    al, byte 0x80
 | 
			
		||||
    jz      short su_op_oscillat_not_sample
 | 
			
		||||
    fst     dword [{{.WRK}}]  ; for samples, we store the phase without mod(p,1)
 | 
			
		||||
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase")}}
 | 
			
		||||
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase") (.SupportsParamValueOtherThan "oscillator" "unison" 0)}}
 | 
			
		||||
    fadd    dword [{{.Input "oscillator" "phase"}}]
 | 
			
		||||
{{- end}}
 | 
			
		||||
    {{.Call "su_oscillat_sample"}}
 | 
			
		||||
@ -202,7 +202,7 @@ su_op_oscillat_not_sample:
 | 
			
		||||
    fprem                    ; we actually computed mod(p+1,1) instead of mod(p,1) as the fprem takes mod
 | 
			
		||||
    fstp    st1              ; towards zero
 | 
			
		||||
    fst     dword [{{.WRK}}] ; store back the updated phase
 | 
			
		||||
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase")}}
 | 
			
		||||
{{- if or (.SupportsParamValueOtherThan "oscillator" "phase" 0) (.SupportsModulation "oscillator" "phase") (.SupportsParamValueOtherThan "oscillator" "unison" 0)}}
 | 
			
		||||
    fadd    dword [{{.Input "oscillator" "phase"}}]
 | 
			
		||||
    fld1                    ; this is a bit stupid, but we need to take mod(x,1) again after phase modulations
 | 
			
		||||
    fadd    st1, st0        ; as the actual oscillator functions expect x in [0,1]
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user