Hello, I try do make my first FX effect but it don’t work. This is my code:

include <stdio.h>

include <stdlib.h>

include <fmod.h>

int main(int argc, char *argv[])
int channel,channel2, echoid, echoid2;
FSOUND_Init(44100, 32, 0);
tir = FSOUND_Sample_Load(FSOUND_FREE, "coca.wav", 0, 0, 0);

channel = FSOUND_PlaySoundEx(FSOUND_FREE, tir, NULL, 1);

echoid = FSOUND_FX_Enable(channel, FSOUND_FX_ECHO); // enable echo and get the first echo handle
echoid2 = FSOUND_FX_Enable(channel, FSOUND_FX_ECHO); // enable echo again and get the second echo handle
FSOUND_FX_Enable(channel, FSOUND_FX_FLANGER); // enable the flange effect, don’t bother with the handle, we’ll just use the default parameters<

FSOUND_SetPaused(channel, 0); // now start the sound playing

FSOUND_FX_SetEcho(echoid, 80.0f, 70.0f, 100.0f, 100.0f, 1); // Alter the parameters of the first echo for the channel it was enabled on. This handle is unique to this effect and this channel. The 2nd echo we enabled will be unaffected

return 0;

I have copied exemples from the tutorial (with comments) but when I listen to my sound "coca", it is played without effect. I have found that the parameters echoid and echoid2 have -1 value. I wonder why. More other, the spectrum analyser doesn’t appear.

Thank you for your help.
P.S: Sorry for my English. 😳

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.