mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat(audio): make the libfilteraudio dependency optional
This commit is contained in:
parent
e1da943e4e
commit
8652fe99e3
|
@ -117,7 +117,6 @@ if (NOT TOXCORE_FOUND OR
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
search_dependency(OPENAL PACKAGE openal)
|
search_dependency(OPENAL PACKAGE openal)
|
||||||
search_dependency(FILTERAUDIO LIBRARY filteraudio)
|
|
||||||
|
|
||||||
if (PLATFORM_EXTENSIONS AND UNIX AND NOT APPLE)
|
if (PLATFORM_EXTENSIONS AND UNIX AND NOT APPLE)
|
||||||
# Automatic auto-away support. (X11 also using for capslock detection)
|
# Automatic auto-away support. (X11 also using for capslock detection)
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "src/audio/backend/openal.h"
|
#include "src/audio/backend/openal.h"
|
||||||
|
#ifdef USE_FILTERAUDIO
|
||||||
#include "src/audio/backend/openal2.h"
|
#include "src/audio/backend/openal2.h"
|
||||||
|
#endif
|
||||||
#include "src/persistence/settings.h"
|
#include "src/persistence/settings.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -167,6 +169,7 @@
|
||||||
*/
|
*/
|
||||||
Audio& Audio::getInstance()
|
Audio& Audio::getInstance()
|
||||||
{
|
{
|
||||||
|
#ifdef USE_FILTERAUDIO
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
static bool Backend2 = false;
|
static bool Backend2 = false;
|
||||||
|
|
||||||
|
@ -178,7 +181,9 @@ Audio& Audio::getInstance()
|
||||||
if (Backend2) {
|
if (Backend2) {
|
||||||
static OpenAL2 instance;
|
static OpenAL2 instance;
|
||||||
return instance;
|
return instance;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
static OpenAL instance;
|
static OpenAL instance;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,9 @@ AVForm::AVForm()
|
||||||
|
|
||||||
cbEnableTestSound->setToolTip(tr("Play a test sound while changing the output volume."));
|
cbEnableTestSound->setToolTip(tr("Play a test sound while changing the output volume."));
|
||||||
|
|
||||||
|
#ifndef USE_FILTERAUDIO
|
||||||
|
cbEnableBackend2->setVisible(false);
|
||||||
|
#endif
|
||||||
cbEnableBackend2->setChecked(s.getEnableBackend2());
|
cbEnableBackend2->setChecked(s.getEnableBackend2());
|
||||||
|
|
||||||
connect(rescanButton, &QPushButton::clicked, this, &AVForm::rescanDevices);
|
connect(rescanButton, &QPushButton::clicked, this, &AVForm::rescanDevices);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user