Skip to content

Commit acd9ad9

Browse files
2 parents 168e28c + 3b9867c commit acd9ad9

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

misc_modules/rigctl_server/src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ class SigctlServerModule : public ModuleManager::Instance {
690690
"0\n" /* RIG_PARM_NONE */;
691691
client->write(resp.size(), (uint8_t*)resp.c_str());
692692
}
693+
// This get_powerstat stuff is a wordaround for WSJT-X 2.7.0
694+
else if (parts[0] == "\\get_powerstat") {
695+
resp = "1\n";
696+
client->write(resp.size(), (uint8_t*)resp.c_str());
697+
}
693698
else {
694699
// If command is not recognized, return error
695700
flog::error("Rigctl client sent invalid command: '{0}'", cmd);

sink_modules/audio_sink/src/main.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff 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) {
290294
MOD_EXPORT void _END_() {
291295
config.disableAutoSave();
292296
config.save();
293-
}
297+
}

0 commit comments

Comments
 (0)