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); }
public void DistributeData(IntPtr channelData, int samples) { Marshal.Copy(channelData, _buffer, 0, samples); OnBufferReady?.Invoke(this, _buffer); }