This project has moved. For the latest updates, please go here.

Naudio Microphone to Filters

Jun 26 at 5:55 AM
Edited Jun 26 at 5:56 AM
I'm currently trying to understand the API and trying to find a way to filter microphone live as i listen to it

So far I figured (by searching for examples online) how to select a device from list and play it through the speakers like so:
    public Form1()
            if (DateTime.Now > DateTime.Parse("September 26, 2017"))
            MMDeviceEnumerator enumerator = new MMDeviceEnumerator();
            var devices = enumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active).Reverse();

            _provider = new BufferedWaveProvider(new WaveFormat());
            _player = new WaveOut();
            _sampleObject = new object();
            _notify = new NotifyingSampleProvider(_provider.ToSampleProvider());
            _notify.Sample += DrawAudioWAve;

        private void BufferPlay(byte[] recv)
            if (recv.Length > 0)
                _provider.AddSamples(recv, 0, recv.Length);
        private void StartAudio()
        private void _audioSource_DataAvailable(object sender, WaveInEventArgs e)

Now i'm curious about implementing a BiQuadFilter.BandPassFilterConstantPeakGain somewhere in there. Could someone show me how this can be done? It's basically applying an equalizer to the live microphone input -

Mic >EQ>Speakers
Jun 26 at 10:23 PM
BiquadFilter works on float sample level, so implement it as an ISampleProvider or parse the samples yourself and pass them in.
Jun 28 at 2:17 AM
OK I'll try to figure out how to do that