I need some pointers where to start with the following:
From any application that plays audio using ALSA to the connected speaker I'd like to grab the samples and do some audio processing. I am not in control of the player and I'd like to be able to process the audio from any source. Basically it will be an UV-meter, perhaps later with FFT (all just on the command line). Additionally I'd like my app to be self-contained.
In my research I've found:
- There is a loopback kernel module.
- You can do fancy stuff with the configuration file.
- There is the ability to create plugins.
Using the kernel module and altering the configuration file introduces some dependencies of my application to the configuration of the system.
And creating a plugin I give up control over the app and cannot start/terminate it whenever I want.
This is not satisfactory to me so I'd like to know if there is a way to either:
- create a loopback device programmatically
- or is there any other way to read from the pcm playback device other applications are writing to.