I would like to reproduce the effect of active noise-control headphones using regular headphones and a Linux computer, in order to mute any ambiant noise in realtime (not just cleaning a sound input from background noise).
The plan is to loopback the microphone input through Alsa/Pulseaudio, apply a feed-forward narrowband noise cancelling filter (as a LADSPA filter ?), then output the result to the headphones.
The problem is I don't know where to start for the filter part : how should I connect it to Alsa/Pulseaudio ? Is there some sort of C API that can be used to create a custom filter ?