arecord and aplay in Audio injector sound card

0

I want to create a fifo with arecord and aplay in raspberry pi3. When I send music signal from audio injector at one end it shows properly but disable the music to other end. I am using "arecord -f S16_LE -r 44100 -V stereo -c1 -D plughw:2 | aplay -D plughw:2"

Please tell me how to solve it and how to stop that command without using ctrl+c ???

naman gupta

Posted 2018-04-02T11:30:39.753

Reputation: 1

Answers

0

Not sure what you are trying to do, in particular I don't understand "disable the music at the other end", but

1) Forwarding audio streams is a lot easier in Pulseaudio (or jack) than ALSA.

2) When using arecord in a pipe, don't use the WAV format, because the WAV header has a length entry, which cannot be filled in a pipe. Either use raw (-t raw) and specify the correct parameters in aplay, or use the SUN audio format (-t au).

3) The arecord-aplay pipe will run, until you stop it either with ctrl-c, or until one or both of the processes is killed (using kill). No other way to do it.

dirkt

Posted 2018-04-02T11:30:39.753

Reputation: 11 627