0
0

I am trying to use the fx compressor on the output channel, but the Enable function returns -1. I have read the tutorial but I can’t find my mistake.

Here is my code:

FSOUND_Init(44100, 32, FSOUND_INIT_ENABLEOUTPUTFX);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, TRUE);
handle = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL, FSOUND_FX_COMPRESSOR);
if (handle<0)MessageBox(0,”error”,””,0); /* this message is shown */

FSOUND_FX_SetCompressor(handle, 0, 0.01, 50, -10, 10, 0);
FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL, FALSE);

Thanks

  • You must to post comments
0
0

Have you set FSOUND_SetBufferSize to a greater value (i.e. 200 ms)? If not, your system will not enable fx because there’s not memory enough for DirectSound.

“Plug and Pray” :)

  • You must to post comments
0
0

Thanks. Now it works.
But now I have another question. Before using FX, I had two level meters. I updated them by calling FSOUND_GetLevels, but now it doesn’t work. Any idea?

  • You must to post comments
0
0

You are opening your streams (I suppose you’re using streams) with FSOUND_HW2D or FSOUND_HW3D flags enabled. If you want your spectrum data back you have to open your streams in software mode (FSOUND_NORMAL) ’cause fx are applied on the system channel only (in this case).

Reference: FMOD documentation > Tutorials > DX8 FX Support

“Plug and Pray” :)

  • You must to post comments
0
0

I have alredy done that, but the sound is distorted.
Thanks.

  • You must to post comments
0
0

Ok, one step ahead.
Try different settings for FSOUND_Init (increase channel number) or give a bit more memory to the stream (FSOUND_Stream_SetBufferSize). Also, check your settings for FSOUND_SetMixer.
You can test your overall settings plying with the Testbed example configuration box.

“Plug and Pray” :)

  • You must to post comments
0
0

I can reduce the distortion by increasing the buffer size. However, I still get a little distortion. I can’t use testbed because is a delphi tool and I don’t have the Delphi IDE to compile it. I have checked setmixer too.

  • You must to post comments
0
0

With the first option of the example I have the same problem. The distortion is low, but is there. However, if I use the version 3.7.0. instead of 3.7.1., both my application and the dsp example sound great.

  • You must to post comments
0
0

I have downloaded the dll and now it works. Thank you very much.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.