kopia lustrzana https://gitlab.com/eliggett/wfview
Check that we have at least 1 audio channel available.
rodzic
5d29dd8ac9
commit
87b26d4ad7
|
@ -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.
|
||||
|
|
Ładowanie…
Reference in New Issue