I'm using PulseAudio on my system, and I followed the instructions for adding a monitor device as per the PulseAudio wiki. The monitor device itself works and registers/functions properly in apps like Audacity, but I'm not able to get the device to show itself through any of the command line tools. aplay -L returns roughly the same list as Audacity, but is conveniently missing the monitor device.
My end goal is to parse the output in a Java app and eventually pass it to FFmpeg. I'm able to tell the device exists through the Java audio APIs as 2 generic "Capture source ports" show up, but it doesn't provide a name for the device, and the goal is for it to be user-selectable in a somewhat friendly manner.
Are there any ways to get the monitor device to show up in either a command line app or through a Java API / library?
Thanks in advance!
13 Answers
Use the pacmd list-sources or pactl list commands to show PulseAudio devices. To show only names you can grep on it's output. This is an example from PulseAudio FAQ
$ LANG=C pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2
With additional grep on ".monitor" you can get only monitor devices.
1So in short, it looks like the problem is up at the alsa level and not at the pulseaudio level? If you want to see the alsa devices try.
aplay -l(but aplay -L which you've already mentioned is similar).
pulseaudio sits on top of alsa. So looking at pactl brings in another layer of software... see here If alsa can't see the sound device then certainly pulseaudio won't?
It's brutally simple:
This shows you the sinks/output ports:
aplay -LSince a 'monitor' is a source/input port, you'll want this:
arecord -L