public int Write(IReadOnlyTimeLocatedBufferFFT buffer, int offset, int frameCount) { if (buffer.Samplerate != Samplerate) { throw new InvalidOperationException(); } if (buffer.FFTSize != FFTSize) { throw new InvalidOperationException(); } var written = _queue.Write(buffer, offset, frameCount); _stamp = _stamp.Increment(written * FFTSize, Samplerate); return(written); }