This commit is contained in:
AlexandreRouma 2023-07-10 04:41:41 +02:00
commit acd9ad9781
2 changed files with 19 additions and 10 deletions

View File

@ -690,6 +690,11 @@ private:
"0\n" /* RIG_PARM_NONE */;
client->write(resp.size(), (uint8_t*)resp.c_str());
}
// This get_powerstat stuff is a wordaround for WSJT-X 2.7.0
else if (parts[0] == "\\get_powerstat") {
resp = "1\n";
client->write(resp.size(), (uint8_t*)resp.c_str());
}
else {
// If command is not recognized, return error
flog::error("Rigctl client sent invalid command: '{0}'", cmd);

View File

@ -45,16 +45,20 @@ public:
int count = audio.getDeviceCount();
RtAudio::DeviceInfo info;
for (int i = 0; i < count; i++) {
info = audio.getDeviceInfo(i);
if (!info.probed) { continue; }
if (info.outputChannels == 0) { continue; }
if (info.isDefaultOutput) { defaultDevId = devList.size(); }
devList.push_back(info);
deviceIds.push_back(i);
txtDevList += info.name;
txtDevList += '\0';
try {
info = audio.getDeviceInfo(i);
if (!info.probed) { continue; }
if (info.outputChannels == 0) { continue; }
if (info.isDefaultOutput) { defaultDevId = devList.size(); }
devList.push_back(info);
deviceIds.push_back(i);
txtDevList += info.name;
txtDevList += '\0';
}
catch (std::exception e) {
flog::error("AudioSinkModule Error getting audio device info: {0}", e.what());
}
}
selectByName(device);
}
@ -290,4 +294,4 @@ MOD_EXPORT void _DELETE_INSTANCE_(void* instance) {
MOD_EXPORT void _END_() {
config.disableAutoSave();
config.save();
}
}