Merge pull request #1114 from bvernoux/master

Workaround for RtAudio Exception when no Input are connected on Input MIC on some PC
pull/1130/head
AlexandreRouma 2023-07-02 18:00:46 +02:00 zatwierdzone przez GitHub
commit ff7ef78b8f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 14 dodań i 10 usunięć

Wyświetl plik

@ -45,6 +45,7 @@ public:
int count = audio.getDeviceCount();
RtAudio::DeviceInfo info;
for (int i = 0; i < count; i++) {
try {
info = audio.getDeviceInfo(i);
if (!info.probed) { continue; }
if (info.outputChannels == 0) { continue; }
@ -54,7 +55,10 @@ public:
txtDevList += info.name;
txtDevList += '\0';
}
catch (std::exception e) {
flog::error("AudioSinkModule Error getting audio device info: {0}", e.what());
}
}
selectByName(device);
}