0
0

I inint 10 band eq with iniEq routine (see below)

on "change" event of slide, I modify the GAIN (see below)

I have 2 problem:

  1. the equalize doesen’t work, i try to chech the state and it is result active! (result = FMOD_DSP_GetActive(eq(0), active)

  2. how can I set on/Off the equalizer?

Thank

Luca

InitEq Routine:

[code:ekpn5vdu]Public Sub iniEq()
Dim result As FMOD_RESULT
Dim i As Integer

eqFreq(0) = 60
eqFreq(1) = 170
eqFreq(2) = 310
eqFreq(3) = 600
eqFreq(4) = 1000
eqFreq(5) = 3000
eqFreq(6) = 6000
eqFreq(7) = 12000
eqFreq(8) = 14000
eqFreq(9) = 16000

For i = 0 To 9
    result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PARAMEQ, Eq(i))
    ERRCHECK (result)
    result = FMOD_System_AddDSP(system, Eq(i))
    ERRCHECK (result)

    iniEqPos(i) = CSng(Val(ReadINI("Equalizer", "eqPos" & i)))

    result = FMOD_DSP_SetParameter(Eq(i), FMOD_DSP_PARAMEQ_CENTER, eqFreq(i))
    ERRCHECK (result)
    result = FMOD_DSP_SetParameter(Eq(i), FMOD_DSP_PARAMEQ_BANDWIDTH, 1)
    ERRCHECK (result)
    result = FMOD_DSP_SetParameter(Eq(i), FMOD_DSP_PARAMEQ_GAIN, iniEqPos(i))
    ERRCHECK (result)

    Form1.sliEq(i).Value = iniEqPos(i)
Next i

End Sub[/code:ekpn5vdu]

Slide event Change:

[code:ekpn5vdu]Private Sub sliEq_Changed(Index As Integer)
Dim result As FMOD_RESULT

iniEqPos(Index) = Me.sliEq(Index).Value
result = FMOD_DSP_SetParameter(Eq(Index), FMOD_DSP_PARAMEQ_GAIN, iniEqPos(Index) / 100)
ERRCHECK (result)
WriteINI "Equalizer", "eqPos" & Index, CStr(iniEqPos(Index))

End Sub[/code:ekpn5vdu]

  • You must to post comments
0
0

… the 1st problem it is ok!

The mistake was in the FMOD_System_CreateStream function that I used FMOD_HARDWARE, after the modify in FMOD_SOFTWARE the equalizer works fine.

for the second plobelm, I made a cycle for disable each eq, … is it correct?

[code:29ww8i34]result = FMOD_DSP_GetActive(Eq(0), active)
ERRCHECK (result)

For i = 0 To 9
result = FMOD_DSP_SetActive(Eq(i), Not active)
Next i[/code:29ww8i34]

  • You must to post comments
0
0

I normally bypass them.

  • You must to post comments
0
0

Ok I try to use bypass system … I Write:

Is It Correct?

Luca

[code:1akjdtb8]Private Sub cmdEqOn_Click()
Dim result As FMOD_RESULT
Dim active As Long
Dim i As Integer

result = FMOD_DSP_GetBypass(Eq(0), active)
ERRCHECK (result)

If active Then
    For i = 0 To 9
        result = FMOD_DSP_SetBypass(Eq(i), 0)
    Next i
    Me.lblEq.Caption = "Eq."
    WriteINI "Equalizer", "eqOn", "No"
Else
    For i = 0 To 9
        result = FMOD_DSP_SetBypass(Eq(i), 1)
    Next i
    Me.lblEq.Caption = "Eq.On"
    WriteINI "Equalizer", "eqOn", "Si"
End If

End Sub[/code:1akjdtb8]

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.