Log in

View Full Version : Linux audio routing


Merk
July 10th, 2018, 11:21 PM
So i've got my own neighborhood range radio station hosted by my raspberry pi. However, I would like the ability to route system sound to this as well. (mainly for smaller scale purposes) but my current setup is simmilar to sudo sox {sox script} -t wav | sudo ./PiFmRds {rds script here} with php as my front end gui.

I already know about different ways to use usb sound card and loopback cable, but its not what i want. there are also gui style programs to do this, but those I know of cant be summonned the way i need.


If anyone here knows a good way to route my system sound using terminal commands like this, that would be great.
Thanks!

Merk
July 12th, 2018, 10:17 AM
I'm gathering nobody here knows.. lol

Leprous
July 12th, 2018, 11:58 AM
Don't think there's a lot of Linux experts on here. I myself am terrible at Linux commands and scripts so doubt I can help out here I'm afraid

Merk
July 13th, 2018, 01:34 AM
Haha yeah I'll be going over to a Linux forum soon, just wanted to see if anyone here had anything :)

bonbon
July 14th, 2018, 11:48 PM
What do you mean by "system sound"? Sound emitted by UI events and such ?

One way to do it "bare metal" (that is, without all the PulseAudio & friends crap) is to use the ALSA file plugin. Make such a virtual audio output that writes data to a named pipe. Have then whatever program you use read audio data from that pipe. ALSA file plugin doc can be found at http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_file

Merk
July 15th, 2018, 05:11 PM
Oh, that looks promising! Thank you Bonbon!

Liven
July 29th, 2018, 05:51 AM
I'm interested in what this is - can you give us more details about it?

It sounds actually really cool.