1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| #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);
FSOUND_SAMPLE *tir = NULL;
FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), 1); //analyseur spectral
tir = FSOUND_Sample_Load(FSOUND_FREE, "coca.wav", 0, 0, 0);// chargement de mon son
channel = FSOUND_PlaySoundEx(FSOUND_FREE, tir, NULL, 1);//mise en pause du son
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
system("pause");
FSOUND_Sample_Free(tir);
FSOUND_Close();
return 0;
} |
Partager