Abort audio setup if device has no channels

translations
Phil Taylor 2024-10-13 11:02:57 +01:00
rodzic c39e2fbdb9
commit 25f2d8f2fb
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -77,6 +77,12 @@ audioHandler::~audioHandler()
nativeFormat = setup.port.preferredFormat();
if (nativeFormat.channelCount() < 1){
// Something is seriously wrong with this device!
qCritical(logAudio()).noquote() << "Cannot initialize audio" << (setup.isinput ? "input" : "output") << " device " << setup.name << ", no channels found";
isInitialized = false;
return false;
}
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Preferred Format: SampleSize" << nativeFormat.sampleSize() << "Channel Count" << nativeFormat.channelCount() <<