The VST effect already does what it is supposed to be doing, i.e.
looping small chunks of the input audio when it is active.
There are some downsides of the current implementation, e.g. that the
buffer is not filled when the effect is in active mode because there is
only one buffer and it is be read from in looping mode. This means that
the buffer does not get updated as long as the looping is active and
thus switching it off and on quickly would output old audio data.
Another approach would be to have two ring-buffers, the first is filled
with the input signal unconditionally whereas the second buffer is a copy of
the first one at the moment of switching on the effect. This would also
simplify the implementation because the second buffer is always read
from the first index.
The copy operation has to be very fast but this should be no problem as
long as `copy_from_slice` is used.
Some nice additions would be:
- set sample length in beat measures, milliseconds and samples
- set playback speed (requires interpolation (linear?))
- allow to reverse audio
PS: Cross compiling for windows by building against the x86_64-pc-windows-gnu
target showed that it runs on Windows as well.