Closed chikashimiyama closed 3 years ago
My first approach is to get rid of this interpolation since it is not properly implemented (interpolation duration should be fixed independent of SR or blocksize)
@danomatika
Please check out the PR and merge if you think it makes sense.
It seems to work fine for me. I compared the interpolation_issue
branch and develop
at 44.1, 48, & 96 SRs.
The biggest thing I noticed is that the CPU usage seems to drop by almost half when just running the sample patch!
@umlaeute Can you check #11?
I will go ahead and assume this is working as intended...
Closed by merging #11.
The author of earplug tried to interpolate the previous impulse response and the current impulse by crossfading it. However, the current implementations have two issues.
https://github.com/pd-externals/earplug/blob/0ba02415bbbf6381083442d2f2c90b08cd8e744d/earplug~.c#L171-L172 the copy from the current to the previous buffer is executed in the convolution process of the first iteration of the blocksize. From the second sample, the current and previous buffer are the same thus, interpolation is not working at all.
In the current implementation, the duration of interpolation depends on the sample rate and block size. Because the crossfade duration is matched with the block size. Thus, if the user changes the SR or block size, the interpolation duration will be changed accordingly and it results in a significant audible difference. This should be avoided.