I want to capture audio on Linux with low latency in a program I'm writing.
I've run some experiments using the ALSA API, using snd_pcm_readi() to capture sound, then immediately using snd_pcm_writei() to play it back.
I've tried playing with the number of frames captured, and the buffer size, but I don't seem to be able to get the latency down to less than a second or so.
Am I better off using PulseAudio or JACK? Can those be used to play the captured audio?