Example #1
0
        public void Generate()
        {
            var gen = Generators[_type];

            for (int i = 0; i < _buffer.Length; i++)
            {
                _buffer[i] = gen(_phaseAcc + _phaseOffset * Math.PI / 180);
                _phaseAcc += _phaseStep;
            }
            OnBufferReady?.Invoke(this, _buffer);
        }
Example #2
0
 public void DistributeData(IntPtr channelData, int samples)
 {
     Marshal.Copy(channelData, _buffer, 0, samples);
     OnBufferReady?.Invoke(this, _buffer);
 }