DSP Effects applied on a fixed length of an audio track only and not beyond it

Hello everyone!

Sorry if this topic is repetitive, but I searched a lot and found no identical records to mine. :wink:
And for your information, I’m a newbie in FMOD Core API, but good at C++ programming. :smiley:

Today, I was playing around a little with System::createDSPByType pre-defined enumerations and I noticed something strange which I don’t know how to fix.

As an example, I want to have a minimal Echo Delay Time with 1500ms. I simply use the DSP::SetParameterFloat to fine-tune the “Delay” float property of my echo instance. However, since my audio sample is too short and there is not enough length for the echo effect to be applied on the whole audio, hence the sample is immediately stopped as soon as it bumps to the end of the audio file which results in a very bad sudden stop effect.

Is there any way to let the DSP apply its effect beyond the limits of the audio track length so the effect wouldn’t get cut out as soon as it reaches the end of the sample?

The solution I’ve learnt from other sound editing programs such as Cool Edit Pro (an ancient one haha) was either adding a little bit of silence at the end of the audio track or choosing the option “Continue echo beyond sound data.”

This problem not only goes for echo but also other DSP effects such as reverb, etc.

Thanks a lot in advance.

Hi, just use ChannelGroup::addDSP instead of Channel::addDSP. When a sound on a channel is finished, the channel is terminated immediately. A channelgroup is a parent object above a channel, so it will persist.

1 Like

Wow!
Thank you so much for your help, much appreciated!

Have a very nice day.