0
0

I am still having problems trying to get an EQ working. Maybe something new has come up.

These are my functions to enable and disable the FX:

bool TfrmMain::startFX()
{
if (FSOUND_GetOutput() == FSOUND_OUTPUT_DSOUND)
{
bool chkOpen = true;

            FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, true);
            //FSOUND_SetPaused(channel, true);

// Enable the equaliser
for (int x = 0;x < 10;x++)
fxChan[x] = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL, FSOUND_FX_PARAMEQ);
//fxChan[x] = FSOUND_FX_Enable(channel, FSOUND_FX_PARAMEQ);
if (fxChan[0] != -1)
setEQ(10);
else
{
for (int x = 0;x < 10;x++)
fxChan[x] = -1;
chkOpen = false;
}
//FSOUND_SetPaused(channel, false);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, false);

            return chkOpen;
    }
    else
    {
            EQ == false;
            return false;
    }

}
//—————————————————————————

void TfrmMain::endFX()
{
if (fxChan[0] != -1)
{
// Pause the system channel
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, true);
//FSOUND_SetPaused(channel, true);
// Disable the EQ
FSOUND_FX_Disable(FSOUND_SYSTEMCHANNEL);
//FSOUND_FX_Disable(channel);
// Unpause the system channels
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, false);
//FSOUND_SetPaused(channel, false);
for (int x = 0;x < 10;x++)
fxChan[x] = -1;
}
}
//—————————————————————————

I have tried opening a stream using both of these methods:

stream1 = FSOUND_Stream_Open(FileName.c_str(), FSOUND_ENABLEFX|FSOUND_HW3D|FSOUND_FORCEMONO, 0, 0);

stream2 = FSOUND_Stream_Open(FileName.c_str(), FSOUND_ENABLEFX|FSOUND_16BITS, 0, 0);

When I use stream1, I use the channel returned from the Play function to set the FX, and when I use stream2, I use the FSOUND_SYSTEMCHANNEL..

Both times I get an error message box (which seems to bypass my exception handling code) with the message:
Failed to set data for ‘EQ’

When I click OK my program terminates.

Any suggestions would be highly appreciated.

  • You must to post comments
0
0

When I use a hardware channel (HW3D), then I uncomment the channel code and comment the FSOUND_SYSTEMCHANNEL, and inversly with the software stream, I took FSOUND_ENABLEFX off the software channel (thanks).

I have no idea where the dialog box comes from, it has a Red circle with a white cross in it as the icon and the message above, I don’t even know how to make a box like that in builder.

Thanks for the help.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.