0
0

I am trying to use an equalizer for my
player and I just can’t seem to get it right.

I can enable the equalizer once, but if I try to
disable it (endFX()) and then restart the EQ (startFX()),
I get a floating point overflow error.

PS. in your help file you have:
“signed char F_API FSOUND_FX_Disable(
int channel
);

Parameters
channel Channel number/handle to enable fx for.”

I think your parameter description might be wrong.

void TfrmMain::startFX()
{
// Enable the equaliser
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, true);
for (int x = 0;x < 10;x++)
fxChan[x] = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL, FSOUND_FX_PARAMEQ);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, false);
}
//—————————————————————————

void TfrmMain::endFX()
{
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, true);
for (int x = 0;x < 10;x++)
FSOUND_FX_Disable(fxChan[x]);
for (int x = 0;x < 10;x++)
fxChan[x] = -1;
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, false);
}
//—————————————————————————

Any advice would be much appreciated.

  • You must to post comments
0
0

I have changed the endFX() function to work off the system channel.

I can start the program with the EQ on, but as soon as I disable it
and then re-enable it, I get the “Floating Point Overflow” error.

The error occurs in this piece of code (in the startFX() function):
for (int x = 0;x < 10;x++)
fxChan[x] = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL, FSOUND_FX_PARAMEQ);

“x” gets to 4, and then the error occurs.

void TfrmMain::endFX()
{
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, true);
FSOUND_FX_Disable(FSOUND_SYSTEMCHANNEL);
for (int x = 0;x < 10;x++)
fxChan[x] = -1;
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, false);
}
//—————————————————————————

  • You must to post comments
0
0

I have got a feeling it is a problem in my settings.

I am using Borland C++ Builder 4.0, and if I run the program
from builder, it works fine. But as soon as I run the program
from explorer, it gives me the error.

I don’t suppose you have any idea what this could be?

Thanks for all the help though.

  • You must to post comments
0
0

I was just messing around and I found that if I
set my executable to run on compatibility mode (Windows 9x/ME),
it would allow you to turn on/off the EQ as much as you want until
you played a song.

Once a song has been played it will always crash as soon
as you try re-enabling the EQ, even if you stop the song
and restart the FMOD system.

I am currently using Windows XP SP1 with DirectX 9.0.

Do you think this is me using an older version of Builder.

  • You must to post comments
0
0

[quote="chris_gorrie":3j71w5zg]

I can enable the equalizer once, but if I try to
disable it (endFX()) and then restart the EQ (startFX()),
I get a floating point overflow error.

[/quote:3j71w5zg]

I’ve got the same thing on Borland Builder 5.01 + Win XP Sp1 + DirectX 9.0
And this error occurs in Win98 SE + DirectX 7 and DirectX 9

“Overflow Error” happens from time to time.

I think it is borland compiler.

Does anyone knows about this error in BCB 6 ??

  • You must to post comments
0
0

The EQ only works on DirectX 8+.

But I have found that on win 98SE with
DirectX 8 & 9, the EQ will work fine.

But on Win XP with DirectX 8 & 9 I get
an error:

“Failed to set data for ‘EQ'”

This is only if I am not running the program
through the compiler.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.