Dry\Wet mix in plugin with latency


#1

Hi, trying to code wet/mix feature to my plugin, but can’t fine the good way to go…
May be someone already walked this road and can give me some help =)

I’m trying to add dry\wet feature to my plugin, and it is not so simple as it looks because plugin have latency.
So I have to buffer incoming data to correctly line up processed and unprocessed data.
And I cant use circular buffer of fixed size because I don’t know the size of buffer that host will pass me, and this size could be non uniform from call to call…

I see it like a sample FIFO buffer that should be initialized with empty data (empty data size will be equal to plugin latency in samples).
But I think that this will be very non efficient way…
Circular buffer will be much more efficient, but I don’t know the size to allocate…


#2

use a simple delay line on the dry data, having a delay time equal to latency of the wet signal.