server plugins: RecordBuf - fix multichannel corruption and buffer overrun

Signed-off-by: Tim Blechmann <tim@klingt.org>
(cherry picked from commit 8f28f9953c6891ef9ac2deebdd806c4ca98bc1bf)