Created
November 19, 2020 23:45
-
-
Save aelindeman/e6f09210b00c65e09e2b48459a710865 to your computer and use it in GitHub Desktop.
alsa audio passthrough service with fifo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=aplay passthrough audio from arecord | |
BindsTo=arecord.service | |
[Service] | |
Environment=INPUT=/var/run/arecord | |
ExecStart=/usr/bin/aplay $INPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=arecord for USB audio device | |
After=sound.target | |
[Service] | |
Environment=OUTPUT=/var/run/arecord | |
ExecStartPre=mkfifo $OUTPUT | |
ExecStart=/usr/bin/arecord --disable-softvol --nonblock --device=plughw:CARD=CODEC,DEV=0 --format=s32_le --rate=192000 --channels=2 $OUTPUT | |
ExecStopPost=-rm $OUTPUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment