libobs/UI: Stop using preprocessor directives for monitor

**Code Cleanup**
Stop using preprocessor directives to determine if audio monitoring
is supported. Use runtime function instead
This commit is contained in:
tt2468 2021-08-31 04:53:02 -07:00 • committed by Jim
commit ff22897d68
6 changed files with 92 additions and 87 deletions

View file

@ -69,11 +69,11 @@ OBSBasicAdvAudio::OBSBasicAdvAudio(QWidget *parent)
label = new QLabel(QTStr("Basic.AdvAudio.SyncOffset"));
label->setStyleSheet("font-weight: bold;");
mainLayout->addWidget(label, 0, idx++);
#if defined(_WIN32) || defined(__APPLE__) || HAVE_PULSEAUDIO
label = new QLabel(QTStr("Basic.AdvAudio.Monitoring"));
label->setStyleSheet("font-weight: bold;");
mainLayout->addWidget(label, 0, idx++);
#endif
if (obs_audio_monitoring_supported()) {
label = new QLabel(QTStr("Basic.AdvAudio.Monitoring"));
label->setStyleSheet("font-weight: bold;");
mainLayout->addWidget(label, 0, idx++);
}
label = new QLabel(QTStr("Basic.AdvAudio.AudioTracks"));
label->setStyleSheet("font-weight: bold;");
mainLayout->addWidget(label, 0, idx++);