Fixed crash after enabling Sound Interpolation mid game. Fixed Gaussian always selected bug when MMX Support is disabled. Some options that are only available with MMX enabled are now hidden if MMX is disabled.

This commit is contained in:
jbo_85
2006-02-16 23:53:06 +00:00
parent a1f182bdb3
commit 4629fb11ff
2 changed files with 22 additions and 14 deletions

View File

@@ -125,7 +125,7 @@ EXTSYM WDSPRegF5,WDSPRegF6,WDSPRegF7,WDSPRegF8,WDSPRegF9,WDSPRegFA,WDSPRegFB
EXTSYM WDSPRegFC,WDSPRegFD,WDSPRegFE,WDSPRegFF EXTSYM WDSPRegFC,WDSPRegFD,WDSPRegFE,WDSPRegFF
EXTSYM spcBuffera,DSPMem,SoundInterpType,NoiseData,Voice0Disable EXTSYM spcBuffera,DSPMem,SoundInterpType,NoiseData,Voice0Disable
EXTSYM cfgecho,Surround,echobuf,ENVDisable,LowPassFilterType EXTSYM cfgecho,Surround,echobuf,ENVDisable,LowPassFilterType
EXTSYM EMUPause,AudioLogging EXTSYM EMUPause,AudioLogging,MMXSupport
%ifdef __MSDOS__ %ifdef __MSDOS__
EXTSYM SB_alloc_dma,SB_quality_limiter,vibracard EXTSYM SB_alloc_dma,SB_quality_limiter,vibracard
@@ -477,18 +477,19 @@ NEWSYM conv2speed
jnz .next jnz .next
ret ret
EXTSYM MMXSupport
NEWSYM AdjustFrequency NEWSYM AdjustFrequency
xor ebx,ebx
mov al,[SoundInterpType] mov al,[SoundInterpType]
mov ah,[MMXSupport] mov ah,[MMXSupport]
cmp ah,0 or al,al
je near .notgaussian
or ah,ah
jne .mmx jne .mmx
cmp al,3
jb .mmx
mov al,1 mov al,1
mov [SoundInterpType],al mov [SoundInterpType],al
.mmx .mmx
or al,al
je near .notgaussian
cmp al,2 cmp al,2
je near .cubicspline je near .cubicspline
ja near .fir_mmx ja near .fir_mmx
@@ -1902,8 +1903,8 @@ BRRDecode:
dec byte[sampleleft] dec byte[sampleleft]
jnz .nextsample jnz .nextsample
cmp byte[SoundInterpType],1 cmp dword[DSPInterpolate],0
jae .BRR_decode_ahead jnz .BRR_decode_ahead
cmp byte[LowPassFilterType],2 cmp byte[LowPassFilterType],2
jle near .no_dlpf jle near .no_dlpf
@@ -4444,7 +4445,7 @@ NEWSYM EchoStereo
pop edx pop edx
pop ebx pop ebx
mov ebx,[Voice0Freq+%1*4] mov ebx,[Voice0Freq+%1*4]
cmp byte[SoundInterpType],0 cmp dword[DSPInterpolate],0
je %%notinterpsound je %%notinterpsound
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je near %%EndofProcessNEnvsi je near %%EndofProcessNEnvsi
@@ -4485,7 +4486,7 @@ NEWSYM EchoStereo
pop edx pop edx
pop ebx pop ebx
mov ebx,[Voice0Freq+%1*4] mov ebx,[Voice0Freq+%1*4]
cmp byte[SoundInterpType],0 cmp dword[DSPInterpolate],0
je %%notinterpsound2 je %%notinterpsound2
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je near %%EndofProcessNEnvsi je near %%EndofProcessNEnvsi
@@ -4500,7 +4501,7 @@ NEWSYM EchoStereo
mov dword[Voice0Time+%1*4],0FFFFFFFFh mov dword[Voice0Time+%1*4],0FFFFFFFFh
%%ContinueGain %%ContinueGain
mov ebx,[Voice0Freq+%1*4] mov ebx,[Voice0Freq+%1*4]
cmp byte[SoundInterpType],0 cmp dword[DSPInterpolate],0
je %%notinterpsound3 je %%notinterpsound3
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je near %%EndofProcessNEnvsi je near %%EndofProcessNEnvsi
@@ -4626,7 +4627,7 @@ NEWSYM EchoStereo
mov byte[UniqueSoundv],1 mov byte[UniqueSoundv],1
%%NotUnique %%NotUnique
cmp byte[SoundInterpType],0 cmp dword[DSPInterpolate],0
je %%notinterpsound4 je %%notinterpsound4
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je %%NextSampleSi je %%NextSampleSi
@@ -4801,7 +4802,7 @@ NEWSYM EchoStereo
mov [Voice0End+%1],al mov [Voice0End+%1],al
mov ebx,[Voice0Freq+%1*4] mov ebx,[Voice0Freq+%1*4]
add dword[Voice0Ptr+%1*4],9 add dword[Voice0Ptr+%1*4],9
cmp byte[SoundInterpType],0 cmp dword[DSPInterpolate],0
je %%notinterpsound6 je %%notinterpsound6
cmp byte[StereoSound],1 cmp byte[StereoSound],1
je near %%NextSampleSi je near %%NextSampleSi

View File

@@ -20,6 +20,8 @@
EXTSYM VERSION_STR,placedate
SECTION .text SECTION .text
; Window Display Routines ; Window Display Routines
@@ -1742,14 +1744,20 @@ DisplayGUISound: ; Sound Related Options
GUIDisplayCheckboxun 6,11,163,SoundInterpType,1,GUISoundTextE1,0 GUIDisplayCheckboxun 6,11,163,SoundInterpType,1,GUISoundTextE1,0
GUIDisplayCheckboxun 6,11,173,SoundInterpType,2,GUISoundTextE2,0 GUIDisplayCheckboxun 6,11,173,SoundInterpType,2,GUISoundTextE2,0
%ifndef __MSDOS__ %ifndef __MSDOS__
cmp byte[MMXSupport],0
je near .no8ptinterp
GUIDisplayCheckboxun 6,11,183,SoundInterpType,3,GUISoundTextE3,0 GUIDisplayCheckboxun 6,11,183,SoundInterpType,3,GUISoundTextE3,0
.no8ptinterp
%endif %endif
GUIDisplayTextY 6,106,158,GUISoundTextF GUIDisplayTextY 6,106,158,GUISoundTextF
GUIDisplayCheckboxun 6,111,163,LowPassFilterType,1,GUISoundTextF1,1 GUIDisplayCheckboxun 6,111,163,LowPassFilterType,1,GUISoundTextF1,1
GUIDisplayCheckboxun 6,111,173,LowPassFilterType,2,GUISoundTextF2,1 GUIDisplayCheckboxun 6,111,173,LowPassFilterType,2,GUISoundTextF2,1
%ifndef __MSDOS__ %ifndef __MSDOS__
cmp byte[MMXSupport],0
je near .nohiqualityfilter
GUIDisplayCheckboxun 6,111,183,LowPassFilterType,3,GUISoundTextF3,0 GUIDisplayCheckboxun 6,111,183,LowPassFilterType,3,GUISoundTextF3,0
.nohiqualityfilter
%endif %endif
GUIDisplayBBox 6,15,61,69,69,167 ;Sampling Rate Box GUIDisplayBBox 6,15,61,69,69,167 ;Sampling Rate Box
@@ -3043,7 +3051,6 @@ DisplayGUIAbout: ; Displays the About Box
;This will attach compile date onto the end of GUIGUIAboutText1 ;This will attach compile date onto the end of GUIGUIAboutText1
pushad pushad
EXTSYM VERSION_STR, placedate
mov eax,GUIGUIAboutTextA1 mov eax,GUIGUIAboutTextA1
mov [VERSION_STR],eax mov [VERSION_STR],eax
call placedate call placedate