tags:

views:

70

answers:

2

Hi,

I setted up a sound with multichannelsupport so now I need to delay the sound in each single speaker. How can I do this with FMODex? Is it possible to do that?

Thanks for helping me! :)

A: 

So I've got an answer to my question by myself and fmod.org. I have to use the FMOD_DSP_TYPE_DELAY. With this type I can set the delay for each channel up to 10 seconds. More informations could be found in the documentation from fmod.

~Update~

Some code for interested fmod users:

FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_DELAY, &dspDelay);
FMOD_Channel_AddDSP(channel, dspDelay, 0);
FMOD_DSP_SetActive(dspDelay, true);

while(true) {
    FMOD_DSP_SetParameter(dspDelay, FMOD_DSP_DELAY_CH0, delayLeft);
    FMOD_DSP_SetParameter(dspDelay, FMOD_DSP_DELAY_CH1, delayRight);

    Sleep(10);
    FMOD_System_Update(system);
}
sn3ek
A: 

don't foget to set maximum!

if(delayDsp != null) 
{ 
    delayDsp.setParameter((int) FMOD.DSP_DELAY.MAXDELAY, trackBarDelay.Maximum); 
}

p.s. set it on some event, not in loop ;}

radioman
Why should I set the delay his maximum value? That doesn't make sense for me. Can you explain?
sn3ek
because without setting maximum value, it doesn't work
radioman