How can I create an ALSA virtual device to pipe audio to a command?

Viewed 316

I have a program that plays a .wav file as FM Radio. It can also receive the audio through stdin. How could I set up an ALSA virtual device so all sound is redirected to that command?

It normally works like this:

*some program that writes wav data to stdout* | sudo ./pifm - 87.5

Edit: I have read, that the file plugin can do that, but as I’ve never worked with ALSA before, I haven’t gotten that to work. A complete code example would be appreciated.

0 Answers
Related