Пример #1
0
        public void Transfer()
        {
            var minFree = Connections.Count > 0 ? Connections.Min(c => ((InputPortDataFFT)c).Free) : int.MaxValue;
            var count   = Math.Min(_transferBuffer.Capacity, minFree);

            var read = _queue.Read(_transferBuffer, count);

            foreach (var input in Connections)
            {
                var written = ((InputPortDataFFT)input).Write(_transferBuffer);
                if (written != read)
                {
                    throw new InvalidOperationException();
                }
            }
        }
Пример #2
0
 public IReadOnlyTimeLocatedBufferFFT Read(int frames)
 {
     frames = Math.Min(frames, Available);
     _queue.Read(_readBuffer, frames);
     return(_readBuffer);
 }