0
0

Hello Brett and all FMOD users and developers!
I’m trying to make Equalizer with at least 10 sliders.
But I have a little problem: when I use first time FSOUND_FX_SetParamEQ(…) it works, but the next time it do nothing and release previous settings, so I hear a plain music.

here is a little code:
BOOL CMedia_PlayerDlg::Update_EQ_FX()
{
CSliderCtrl* eq1_100_slider = (CSliderCtrl)m_pEqualizerDlg1->GetDlgItem(IDC_100_SLIDER);
CSliderCtrl
eq1_200_slider = (CSliderCtrl)m_pEqualizerDlg1->GetDlgItem(IDC_200_SLIDER);
CSliderCtrl
eq1_300_slider = (CSliderCtrl*)m_pEqualizerDlg1->GetDlgItem(IDC_300_SLIDER);

//int m_fxid - it's a member of class;
switch(file_type[0])
{
case TYPE_STREAM:

    FSOUND_SetPaused(channel[0],TRUE);
    FSOUND_FX_Disable(channel[0]);
    m_fxid[0] = FSOUND_FX_Enable(channel[0],FSOUND_FX_PARAMEQ);
    FSOUND_FX_SetParamEQ(m_fxid[0],16000.0f,36.0f,15.0f-(float)eq1_300_slider->GetPos());
    FSOUND_FX_SetParamEQ(m_fxid[0],8000.0f,36.0f,15.0f-(float)eq1_200_slider->GetPos());
    FSOUND_FX_SetParamEQ(m_fxid[0],100.0f,36.0f,15.0f-(float)eq1_100_slider->GetPos());
    FSOUND_SetPaused(channel[0],FALSE);

    break;
case TYPE_MODULE:
    break;

}

return TRUE;

}

Thanks…. :-)

  • You must to post comments
0
0

Thank you, Brett. :-)
I successed to do it and it works exellent!
And now I have another question:

I need to do FX + Spectrum analysis…
I must initialize FSOUND_Init(…) with FSOUND_INIT_ENABLEOUTPUTFX flag, but my VC++ 6 tells me that the flag is undeclared identifier. In FSOUND_INIT_FLAGS help topic this flag really not appear.
So, what should I do?
Or you mean flag FSOUND_INIT_ENABLESYSTEMCHANNELFX? (I tryed it but in nt works);

  • You must to post comments
0
0

Ok I did FSOUND_INIT_ENABLESYSTEMCHANNELFX… Thank you… :-)
Look, I’m writing Dual-Channel Media Player. Each channel have its own EQ and FX. I need spectrum from global output. So, when I use FSOUND_NORMAL flag in FSOUND_Stream_Open(…) it not allows to call succesfully FSOUND_Enable(..) for specific channel. I receive returned value -1.

How I can do my plan?
Where is I’m wrong?

stream[0] = FSOUND_Stream_Open(ofn1.GetPathName(),FSOUND_NORMAL,0,0);
stream[1] = FSOUND_Stream_Open(ofn2.GetPathName(),FSOUND_NORMAL,0,0);

channel[0] = FSOUND_Stream_PlayEx(FSOUND_FREE,stream[0],DrySFXUnit[0],TRUE);
channel[1] = FSOUND_Stream_PlayEx(FSOUND_FREE,stream[1],DrySFXUnit[0],TRUE);

FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, TRUE);

if(-1 == (m_fxid1[0] = FSOUND_FX_Enable(channel[0], FSOUND_FX_PARAMEQ)))
MessageBox(“fxid1[0] Failed”);
if(-1 == (m_fxid2[0] = FSOUND_FX_Enable(channel[1], FSOUND_FX_PARAMEQ)))
MessageBox(“fxid2[0] Failed”);

FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, FALSE);

FSOUND_SetPaused(channel[0],FALSE);
FSOUND_SetPaused(channel[1],FALSE);

//
// This code really allows me to get sectrum, but deny EQ and FX
//

Thanks for your help, Brett…. :-)

  • You must to post comments
0
0

Hi Brett!
Thanks for your advice… :-)
I’ll rebuild my program: two channels, but one global FX & Spectrum…

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.