delay: mix parameter keeps dry signal constant, only fades in wet signal up to 50%
This commit is contained in:
parent
17f4de175a
commit
bcbce9e1fb
1 changed files with 3 additions and 3 deletions
6
delay.c
6
delay.c
|
@ -42,14 +42,14 @@ void delay_process(
|
|||
for( size_t i = 0; i < frame_size; ++i ) {
|
||||
if( delay->duration > 0 ) {
|
||||
out[i] =
|
||||
(1.0 - delay->mix) * in[i]
|
||||
+ delay->mix * delay->buf[ delay->buf_idx ];
|
||||
0.5 * in[i]
|
||||
+ 0.5 * delay->mix * delay->buf[ delay->buf_idx ];
|
||||
|
||||
delay->buf[ delay->buf_idx ] *= delay->feedback;
|
||||
delay->buf[ delay->buf_idx ] += (1.0 - delay->feedback) * in[i];
|
||||
delay->buf_idx = (delay->buf_idx + 1) % delay->duration;
|
||||
} else {
|
||||
out[i] = in[i];
|
||||
out[i] = 0.5 * in[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue