public void CanCreateWaveOutDevice() { WaveOut waveOut = new WaveOut(); var source = new SineGenerator().ToWaveSource(16); waveOut.Initialize(source); waveOut.Dispose(); }
public void DmoResamplerTest() { var source = new SineGenerator().ToWaveSource(16); using (DmoResampler resampler = new DmoResampler(source, 11500)) { byte[] buffer = new byte[source.WaveFormat.BytesPerSecond / 2]; if (resampler.Read(buffer, 0, buffer.Length) != buffer.Length) { throw new Exception("Could not fill the whole buffer"); } } }