Ejemplo n.º 1
0
        public void WriteFrame(double[] data, int offset)
        {
            var written = _queue.Write(data, offset, 1);

            if (written != 1)
            {
                throw new ArithmeticException();
            }
        }
Ejemplo n.º 2
0
        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);
        }