0
0

Hello – I’ve had some luck with getting the spectrum & the eq to work properly. Well luck doesn’t have much to do it, Paranoid Android’s latest
example set me straight on a few things. 😛

However, I am having a problem applying EQ values that I save to an INI file. The values are being saved/loaded to/from the INI file just fine. When stepping through the code that sets the values using FSOUND_FX_SetParamEQ it is reflecting the proper values and executes w/o error

For example:
[code:29zmz2fh] Call FSOUND_FX_SetParamEQ(Eq(0), 80, 18, frmEqualizer.sldEQ(0).Value) [/code:29zmz2fh]

The .Value is the appropriate value and runs w/o error. But it doesn’t change the audio stream as expected. If I drag my slider it adjusts the audio stream just fine.

The code for my slider is as follows:
[code:29zmz2fh]
Dim nValue As Integer
nValue = sldEQ(Index).Value
Select Case Index
Case 0: Center = 80
Case 1: Center = 170
Case 2: Center = 310
Case 3: Center = 600
Case 4: Center = 1000
Case 5: Center = 3000
Case 6: Center = 6000
Case 7: Center = 12000
Case 8: Center = 14000
Case 9: Center = 16000
End Select

Call FSOUND_FX_SetParamEQ(Eq(Index), Center, 18, Gain)

[/code:29zmz2fh]

Before values are attempted to be applied using FSOUND_FX_SetParamEQ they are Enabled during the Init used @ the start of the app. Hell, even if I break to the Immediate Window and call a sub that loads the values pulling them from the sliderbar value it still doesn’t apply, but if I go back to the slider and drag it it applies just fine.

If someone can set this newb straight I’d appreciate it :)

Thanks,
Sterg

  • You must to post comments
0
0

Well, just from looking at that code, shouldn’t you change Gain to nValue?

  • You must to post comments
0
0

Oops.. well I left a small segment out, that bottom codeblock works fine. I need to do some juggling with nValue due to some sliderbar limitations that I’m encountering.

Again, the slider code works fine, I’ll go back and edit the post so it reflects the proper code. The problem I’m having is I can only apply the EQ changes if I use the slider controls, I can’t seem to change them via a sub that’ll apply the settings read from an INI file. The settings are read from the .INI fine, and they are passed on to the FSOUND_FX_SetParamEQ function fine, it just doesn’t seem to apply unless I physically drag the slider. I’m baffled.

If that makes sense…

  • You must to post comments
0
0

Guess I can’t modify messages, anyhoo.. not that it reall matters seeing the slider code works, but for thoroughness I’ll post it below.

[code:2qc1vzdx]
Dim nValue As Integer
nValue = sldEQ(Index).Value
If nValue = 21 Then
nValue = 20
ElseIf nValue = -21 Then
nValue = -20
End If

Select Case Index
    Case 0: Center = 80
    Case 1: Center = 170
    Case 2: Center = 310
    Case 3: Center = 600
    Case 4: Center = 1000
    Case 5: Center = 3000
    Case 6: Center = 6000
    Case 7: Center = 12000
    Case 8: Center = 14000
    Case 9: Center = 16000
End Select

Call FSOUND_FX_SetParamEQ(Eq(Index), Center, 18, nValue)
[/code:2qc1vzdx]

The particular slider control I’m using has issues if you attempt to set the slider value to the .max or .min properties via code. It doesn’t update the slider handle for whatever reason. So I just bump it up an additional value and filter it out. A bit hodge-podge but it works :)

  • You must to post comments
0
0

Well I found the problem.. it was clearly a case of RTFM. I figured you could go 20/-20 db with the EQ bands.. the docs show it’s 15/-15. The values weren’t being applied from code because they were invalid.. they worked ont he slider because it remembered the last valid setting.. 15/-15.

Thanks,
Sterg

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.