322 Audio Effects: Theory, Implementation and Application
The above lines store the current input sample in the local variable in and
declare a variable out that will hold the result.
out = (dryMix_ * in + wetMix_ * delayData[dpr]);
This applies the basic delay equation from Chapter2, calculating the out-
put in terms of the sum of the input and the output of the delay buffer. Each
term is weighted by a parameter (dryMix_ and wetMix_, respectively). dpr
is the read pointer into the delay buffer that keeps track of the next sample to
read out. Next, the content of the delay buffer is updated:
delayData[dpw] = in + (delayData[dpr] * feedback_);
dpw is the write pointer into the delay buffer. The content of the buffer is
updated as the sum of the ...