Showing results for 
Search instead for 
Did you mean: 

How do I create a delay effect with ipp?

Sorry if this is a basic concept, I'm just a little confused as to the best way to approach this using ipp. Specifically I am in a situation where audio is being "streamed" to me from the sound card in "blocks"... for example, 256 samples at a time. And I need to apply a delay to the audio, say a 4 second delay.

I imagine I'll need to do something like this:

1) set up some filter with a delay line the size of (seconds * samplerate or whatever)

2) in my "processBlock" function, get the delayline from the filter at some index (how?)

3) "add" it to my current block

4) then add that back onto the delay line (how?)

If my assumption is correct, I have several questions:

1) which filters / functions do I use to do this? I see there are get/set delay line functions, but it's not clear which ones to use.

2) how do I get / set the delay line at a given index to get the data at the correct "time" for my current block?

3) What if I want to change the delay time "dynamically"... eg. 4 seconds to 5 seconds, how do I handle that?

If my assumption is not correct... what is the correct approach? There is an "echo" example in the IPP book, but it's not using delay lines, and is actually using an IIR filter to process an entire wav at once.

Does anyone have any examples code they could share?

Thanks! :)
0 Kudos
0 Replies