I have an application that I need to record audio coming from. For that purpose I am using
pavucontrol to set the audio input for the recording software to the monitor of the audio output. Now my issue is that most of the times, I do not want to hear the output. For that purpose I created a dummy output device using
modprobe snd-aloop. This works great, but sometimes I want to listen in on the live audio stream, while still recording. That means I always have to change both the audio output of the sound application and the audio input of the recording application, which can get really tiring. Plus, that will result in the recording application to record everything I hear, not just the specific application.
I found this answer, but it's not exactly what I want since I don't want the sound output on all devices. Just the dummy loop and another output of my choosing. My system is arch-linux using gnome3-shell. I do NOT want this to be permanently so I need a solution that I can change on-the-fly.
Bonus question: I would love to have a shortcut that enabled/disables "live listening" (adding a second audio output to the application's audio stream), for that reason a CLI command would be great.
To be perfectly clear, I want to be able to switch between the following audio routings:
[playback app] --> [dummy aloop] --> [monitor of aloop] --> [recording app]
[playback app] --> [dummy aloop] --> [monitor of aloop] --> [recording app] \-> [headphones] (simultanously)