On Mon, Dec 21, 2015, at 02:30 PM, Alexandru Csete wrote:
> In the gqrx binary I have I can only select "Default" audio output
> device and then decide which hardware to use under system preferences.
> In system preferences, I can switch between audio devices even while
> gqrx is running. As I remember this is the intended behavior, no?
Good question.
In my testing with just GR, I find that I can select whichever audio
device I want to from the command-line. It does't matter which is
selected in the System Preferences Sound panel. OS X directs the sound
to any legitimate output audio device, and I can select that device from
the CLI or GRC interface via a specific string.
That said, flow graph execution fails when the audio device selection to
a specific device fails. I believe that the gr-audio-sink throws a C++
exception, which then must be caught by the calling program. For the OS
X output audio device and using Python for scripting, the exception
looks like the following:
[{{
gr::log :INFO: audio source - Audio sink arch: osx
gr::log :ERROR: audio_osx_sink0 -
A unique output audio device name matching the string 'Inter' was not
found.
The current known output audio device names are:
Mpow Cheetah
Built-in Output
Traceback (most recent call last):
File "./dial_tone.py", line 60, in <module>
my_top_block().run()
File "./dial_tone.py", line 54, in __init__
dst = audio.sink(sample_rate, options.audio_output)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/audio/audio_swig.py",
line 221, in make
return _audio_swig.sink_make(*args, **kwargs)
RuntimeError: audio_osx_sink::setup
}}}
The OP's error was:
{{{
ERROR:
A unique output audio device name matching the string 'built-in' was not
found.
The current known output audio device names are:
Instant On Sound Effects
MOTU Audio Express
libc++abi.dylib: terminating with uncaught exception of type
std::runtime_error: audio_osx_sink::setup
Abort trap: 6
}}}
which implies that the OS X audio output device name was stored
somewhere, and that Gqrx isn't handling the C++ exception property.
Thus, hopefully doing "Gqrx -r" to reset it will work for the OP.
That said, in Gqrx if I select an output audio device that is not the
one select in the System Preferences, then Gqrx errors out in the same
way as the OP found.
Thus, I believe that Gqrx isn't handling the OS X output audio device
selection as robustly as it could. Just a guess right now. - MLD