I have failed to pipe the recorded audio input on my audio device (an alsa driven hifiberry with an adc hosted on a raspberry pi) despite trying my best to pipe the output into tee after arecord, install and set up pulseaudio and utilize parec, as well as jackd and jack_capture.
Critical diagram of my mission:
Line level audio -> ADC -> PCM/Wav File -> DAC -> line level audio.
The problem is that no output ever plays during recording.
I am recording a line level input and would like to hear it. Latency is not critical but I expect it to be 200ms or less.
I have succeeded in this incredibly hackish solution which is just to "arecord" in one terminal window and "aplay" in another (which works) but this cannot possibly be the solution to my problem.
To compound the issue, my attempts at googling this have failed miserably as google believes I simply must be trying to capture the output of one application to a file. I am not. I want to monitor the sound card's input. In Apple's Logic Pro this is referred to as "software monitoring" -- I figured this would be easy. I have also seen it referred to as "play-through" but maybe this is something else.
My hopes were raised with pulseaudio -- it's just "sources and sinks" they said.
I did succeed to record a pcm file with pulseaudio's parec, alsa's arecord and jackd + jack_capture. I'm clearly missing something obvious.
parec -d alsa_input.platform-soc_sound.stereo-fallback | sox -t raw -b 16 -e signed -c 2 -r 44100 - /mnt/audio/pulsetest.wav
Clearly my os and hardware can "duplex" because I can arecord and aplay at the same time.
Can this be done or should I continue using arecord and aplay?