Coding a Variable Delay with LFO (MATLAB/C)
I answer this way because i don't have permission for comments.
I don't have a complete solution. What happens with an chorus flanger is this.

Signal xt goes in split in two(or maybe more) signal paths and mixed together at the end.
The difference is the length of the delay (Flanger &lt;10ms and chorus 20 - 60ms).
First your Lfo discription isn't right.
It should me something like :lfo = A *sin(2*pi*lfo_rate*[0:length(output)]/fs) + Offset; Where A is half the time (Positive and negative) and offset the center time where the LFO is turning around.
And `A =&lt; offset' otherwise the time gets negative

The difficulty is i think a variable buffersize. let say a chorus center time is 50 ms with ±10 ms delay. no Lfo you have 44100 * 20/1000 = 2205 samples. the max buffer = 2646 samples and the min buffer = 1764 Samples.

Hope you can do something with the info