0
0

whenever I begin my application does it happen a mistake "floating point overflow",how can I solve that? <sorry for my english> 😳

I’m use Borland c++ builder 6.

my source code :::


FSOUND_STREAM *sond;
int FXHeq60;
int FXHeq180;
int FXHeq310;
int FXHeq600;
int FXHeq1k;
int FXHeq3k;
int FXHeq6k;
int FXHeq12k;
int FXHeq14k;
int FXHeq16k;

FSOUND_SetOutput (FSOUND_OUTPUT_DSOUND);
FSOUND_SetDriver (0);
FSOUND_SetMixer (FSOUND_MIXER_AUTODETECT);
FSOUND_SetBufferSize (100);
FSOUND_Init (44100, 32,FSOUND_INIT_ENABLESYSTEMCHANNELFX);

sond=FSOUND_Stream_Open("C:\music.mp3",FSOUND_NORMAL,0,0);
FSOUND_Stream_Play(0,sond);

FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, TRUE);
FXHeq60 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq180 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq310 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq600 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq1k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq3k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq6k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq12k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq14k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq16k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, FALSE);

// TEST

FSOUND_FX_SetParamEQ(FXHeq1k,1000,12,15);
FSOUND_FX_SetParamEQ(FXHeq3k,3000,12,15);
FSOUND_FX_SetParamEQ(FXHeq6k,6000,12,15);
FSOUND_FX_SetParamEQ(FXHeq12k,12000,12,15);
FSOUND_FX_SetParamEQ(FXHeq14k,14000,12,15);
FSOUND_FX_SetParamEQ(FXHeq16k,16000,12,15);


PLEASE HELP ME

  • You must to post comments
0
0

you said ‘when i begin my application’, do you actually mean on one of the function calls? Have you tried commenting out certain ones to ssee if it stops it happening. I would expect the dx8 FSOUND_FX functions personally, thats why i don’t recommend using them and use the far superior FMOD Ex functions.

  • You must to post comments
0
0

the problem only happens when I use the equalizer!

this is my complete source code :

//—————————————————————————

include <vcl.h>

pragma hdrstop

include "fmod.h"

include "Unit100.h"

//—————————————————————————

pragma package(smart_init)

pragma resource "*.dfm"

TForm1 *Form1;
FSOUND_STREAM *sond;
int FXHeq60;
int FXHeq180;
int FXHeq310;
int FXHeq600;
int FXHeq1k;
int FXHeq3k;
int FXHeq6k;
int FXHeq12k;
int FXHeq14k;
int FXHeq16k;
//—————————————————————————
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
FSOUND_SetOutput (FSOUND_OUTPUT_DSOUND);
FSOUND_SetDriver (0);
FSOUND_SetMixer (FSOUND_MIXER_AUTODETECT);
FSOUND_SetBufferSize (100);
FSOUND_Init (44100, 32,FSOUND_INIT_ENABLESYSTEMCHANNELFX);
}
//—————————————————————————
void __fastcall TForm1::FormCreate(TObject *Sender)
{

sond=FSOUND_Stream_Open("C:\19 Faixa 19.mp3",FSOUND_NORMAL,0,0);
FSOUND_Stream_Play(0,sond);

//when I remove that part below everything turn to work

FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, TRUE);
FXHeq60 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq180 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq310 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq600 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq1k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq3k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq6k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq12k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq14k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FXHeq16k = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, FALSE);

FSOUND_FX_SetParamEQ(FXHeq1k,1000,12,15);
FSOUND_FX_SetParamEQ(FXHeq3k,3000,12,15);
FSOUND_FX_SetParamEQ(FXHeq6k,6000,12,15);
FSOUND_FX_SetParamEQ(FXHeq12k,12000,12,15);
FSOUND_FX_SetParamEQ(FXHeq14k,14000,12,15);
FSOUND_FX_SetParamEQ(FXHeq16k,16000,12,15);

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

what did I make wrong?

  • You must to post comments
0
0

See if it is a particular frequency that you are specified. This is not an fmod problem it is a dx8 effects issue. If you want solid cross platform effects dont use it, and use FMOD EX instead.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.