File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
sink_modules/audio_sink/src Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,20 @@ class AudioSink : SinkManager::Sink {
4545 int count = audio.getDeviceCount ();
4646 RtAudio::DeviceInfo info;
4747 for (int i = 0 ; i < count; i++) {
48- info = audio.getDeviceInfo (i);
49- if (!info.probed ) { continue ; }
50- if (info.outputChannels == 0 ) { continue ; }
51- if (info.isDefaultOutput ) { defaultDevId = devList.size (); }
52- devList.push_back (info);
53- deviceIds.push_back (i);
54- txtDevList += info.name ;
55- txtDevList += ' \0 ' ;
48+ try {
49+ info = audio.getDeviceInfo (i);
50+ if (!info.probed ) { continue ; }
51+ if (info.outputChannels == 0 ) { continue ; }
52+ if (info.isDefaultOutput ) { defaultDevId = devList.size (); }
53+ devList.push_back (info);
54+ deviceIds.push_back (i);
55+ txtDevList += info.name ;
56+ txtDevList += ' \0 ' ;
57+ }
58+ catch (std::exception e) {
59+ flog::error (" AudioSinkModule Error getting audio device info: {0}" , e.what ());
60+ }
5661 }
57-
5862 selectByName (device);
5963 }
6064
@@ -290,4 +294,4 @@ MOD_EXPORT void _DELETE_INSTANCE_(void* instance) {
290294MOD_EXPORT void _END_ () {
291295 config.disableAutoSave ();
292296 config.save ();
293- }
297+ }
You can’t perform that action at this time.
0 commit comments