Check that we have at least 1 audio channel available.

merge-requests/5/head
Phil Taylor 2021-06-07 14:04:52 +01:00
rodzic 5d29dd8ac9
commit 87b26d4ad7
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -198,6 +198,12 @@ bool audioHandler::init(audioSetup setupIn)
if (format.channelCount() > 2) {
format.setChannelCount(2);
}
else if (format.channelCount() < 1)
{
qCritical(logAudio()) << (setup.isinput ? "Input" : "Output") << "No channels found, aborting setup.";
return false;
}
devChannels = format.channelCount();
nativeSampleRate = format.sampleRate();
// chunk size is always relative to Internal Sample Rate.