gqrx
gqrx copied to clipboard
Easy use of usr-defined 2nd audio device
Lately have been using Gqrx to do some digital mode stuff. This requires piping output to VB-Cable so a second app can use the audio for decoding purposes, e.g., Dream for DRM.
In order to do this in Gqrx, one needs to:
- Stop current DSP processing
- Bring up the Configure IO Devices dialog.
- Switch the Audio output from Default (or whatever I'm listening on) to VB-Cable and click Ok.
- Re-engage the DSP processing.
- Repeat from step one to go back to your primary audio output device.
It works very well, but does make it a little cumbersome to switch back and forth between standard, internally demodulation modes and external processes such as Dream, fldigi, etc.
A nice-to-have feature would be to have one button on the toolbar that re-routes the audio to a second, user-defined audio sink, then routes it back to the primary one once disengaged.
Another option, albeit rather ambitious, would be to add other digital demodulation schemes to Gqrx, such as DRM and NSRC5 for audio, as well as other modes to complement the AFSK tool (such as F6CTE's fabulous Windows-based MultiPSK), but that might be astonomically out of scope for this project.
From what I've seen of the code, it wouldn't be too hard to move the audio output selection to the demod/audio dock settings instead of having it set at the global/top-level. I have a fork that I'm playing around with, I'll see whether this is feasible or not at some point.
One thing you'll probably see is that changing the output selection if output is live will change the output setting but kill the DSP without automatically restarting it. I think it should be able to do that as well.
I'm assuming that the flow would be something similar to how the RDS is toggled (disconnect, RDS adjusted, reconnect) but for audio output (disconnect, change audio output, reconnect). It should be a very quick and easy process if you're familiar with the code (I'm not, atm).
It may depend which audio lib is in use; I know the pulseaudio sink can be reconfigured on the fly without stopping the radio DSP, the other adaptors might not be so flexible.
Guess mine is using PortAudio. Running from terminal I get this status message: PortAudio V19.7.0-devel, revision 147dd722548358763a8b649b3e4b41dfffbcfbb6 (version 1246976)
I think I have now established that the portaudio adaptor can be reconfigured without interrupting the DSP flowgraph.
Just thinking ahead: Since many digital decoding apps don't have a 'passthrough' capability, I wonder if it's also possible to configure it such that you can keep the main audio, but add a route to the second device, kind of like an Aux Out. If so, that might be a good option to have.
Personally I don't thing that should be the concern of Gqrx, the host system should be doing the audio routing.
You may be right, just as a tuner is only a part of an integrated stereo amplifier. I'm not sure there's anything available that does that. Maybe a new winter project for me... lol.
At least on Mac you can create a device with multiple out and select it from GQRX. Here I'm using BlackHole as VB-Cable and also hearing from the SHARP, but I can switch, enable or mute as I like. Just make sure to have drift correction enabled.
That's exactly what I'm looking for... Cheers!
I Honestly didn't know you could do that using the Audio MIDI Setup.
So, I was able to set up a Multi-Out pseudo device that includes my MBP's Built-In speakers, USB 5.1 device, and VB-Cable. Set Gqrx to use the Multi-Out with the main audio through the USB device, which is what I primarily listen through. Changed Dream's input to VB-Cable and it's output to the Built-In speakers.
Just tuned to 15.105, USB, 10kHz wide to test against a DRM signal. If I need to adjust the master volume while Dream is playing, I can mute it from the macOS toolbar. Everything is working precisely as I originally envisioned it.
I just need to test using some of the other digital decoders, but if this works I don't see a problem elsewhere.
Thanks again!