0
0

Hello!

I have looked at the samples in FMOD.chm, but it doesnt run on my
Computer. I use the Borland C++ Builder 6 and these is my Code

[code:24p6id5g]
//Declarations

include <fmod.h>

FSOUND_SAMPLE *i;

int FXHeq60;
int FXHeq180;
int FXHeq310;
int FXHeq600;
int FXHeq1k;
int FXHeq3k;
int FXHeq6k;
int FXHeq12k;
int FXHeq14k;
int FXHeq16k;
//————————————————————-PlayButton
void __fastcall TForm1::Button1Click(TObject Sender)
{
if (FSOUND_GetOutput() == FSOUND_OUTPUT_DSOUND) {
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);
}
if(FSOUND_PlaySoundEx(TrackBar1->Position,i,NULL,FSOUND_ENABLEFX)){Aktiv=1;TrackBar1->Enabled=false;}
ScrollBar1->Position=FSOUND_GetFrequency(1);
Sample=ScrollBar1->Position;
ScrollBar3->Position=128;
}
//————————————————————-Application start
void __fastcall TForm1::FormCreate(TObject *Sender)
{
FSOUND_SetBufferSize(100);
FSOUND_SetDriver(0);
FSOUND_SetMixer(FSOUND_MIXER_QUALITY_AUTODETECT);
FSOUND_Init(
48000,
1,
FSOUND_INIT_ENABLESYSTEMCHANNELFX
);
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
}
//————————————————————-Load Button
void __fastcall TForm1::Button2Click(TObject *Sender)
{
i = FSOUND_Sample_Load(0,Edit1->Text.c_str(),/
FSOUND_ENABLEFX + */FSOUND_HW2D,0,0);
}0
//——————————————————————-Equalizer Scrollbars
void __fastcall TForm1::ScrollBar5Change(TObject *Sender)
{
FSOUND_FX_SetParamEQ(FXHeq60,60,12,12-ScrollBar5->Position);
}

[/code:24p6id5g]

I scroll the ScrollBars, but it doesn’t change anything in output…

Whats wrong?

  • You must to post comments
0
0

ok. The Equalizer runs.

But the echo-effect doesn’t rum.

[code:2i4vcs6j]

FSOUND_DSPUNIT    *DrySFXUnit = NULL;
DrySFXUnit = FSOUND_DSP_Create(NULL, FSOUND_DSP_DEFAULTPRIORITY_USER+100, 0);
FSOUND_DSP_SetActive(DrySFXUnit, TRUE);

channel = FSOUND_PlaySoundEx(TrackBar1->Position, i, DrySFXUnit, TRUE);
if(channel){Aktiv=1;TrackBar1->Enabled=false;}
echoid = FSOUND_FX_Enable(channel, FSOUND_FX_ECHO);
echoid2 = FSOUND_FX_Enable(channel, FSOUND_FX_ECHO); FSOUND_FX_Enable(channel, FSOUND_FX_FLANGER);
FSOUND_SetPaused(channel, FALSE);
if(FSOUND_FX_SetEcho(echoid, 80.0f, 70.0f, 100.0f, 100.0f, TRUE)==0)Close(); // returns 0

if (FSOUND_GetOutput() == FSOUND_OUTPUT_DSOUND)
{
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);

}
[/code:2i4vcs6j]

  • You must to post comments
0
0

I have a new problem:

The Equalizer runns, if i start my program in Borlands IDE.
If i start my Program alone, there i see an errormessage:
“Invalid floating Piont Operation.”

If i disable the
[code:1igx1oxg]
FXHeq60 = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_PARAMEQ);
[/code:1igx1oxg]
Lines, the Program runs without errors, but the equalizer works not.

I have debugged a long time in BCB, but no error found.
But Standalone. Nothing works.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.