diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 558c5e44a..8364ac367 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -117,7 +117,6 @@ if (NOT TOXCORE_FOUND OR endif() search_dependency(OPENAL PACKAGE openal) -search_dependency(FILTERAUDIO LIBRARY filteraudio) if (PLATFORM_EXTENSIONS AND UNIX AND NOT APPLE) # Automatic auto-away support. (X11 also using for capslock detection) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 1e0681b98..aa92fbe35 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -19,7 +19,9 @@ #include "audio.h" #include "src/audio/backend/openal.h" +#ifdef USE_FILTERAUDIO #include "src/audio/backend/openal2.h" +#endif #include "src/persistence/settings.h" #include @@ -167,6 +169,7 @@ */ Audio& Audio::getInstance() { +#ifdef USE_FILTERAUDIO static bool initialized = false; static bool Backend2 = false; @@ -178,7 +181,9 @@ Audio& Audio::getInstance() if (Backend2) { static OpenAL2 instance; return instance; - } else { + } else +#endif + { static OpenAL instance; return instance; } diff --git a/src/widget/form/settings/avform.cpp b/src/widget/form/settings/avform.cpp index dbd8dd63f..cea87eea6 100644 --- a/src/widget/form/settings/avform.cpp +++ b/src/widget/form/settings/avform.cpp @@ -60,6 +60,9 @@ AVForm::AVForm() cbEnableTestSound->setToolTip(tr("Play a test sound while changing the output volume.")); +#ifndef USE_FILTERAUDIO + cbEnableBackend2->setVisible(false); +#endif cbEnableBackend2->setChecked(s.getEnableBackend2()); connect(rescanButton, &QPushButton::clicked, this, &AVForm::rescanDevices);