Don't try to use PulseAudioQt on Windows
This commit is contained in:
parent
ba30d97f92
commit
a67a99a7d6
2 changed files with 10 additions and 1 deletions
|
@ -11,9 +11,13 @@ target_link_libraries(kdeconnect_findthisdevice
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::Multimedia
|
Qt5::Multimedia
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
KF5::PulseAudioQt
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
target_link_libraries(kdeconnect_findthisdevice
|
||||||
|
KF5::PulseAudioQt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp)
|
set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp)
|
||||||
ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui)
|
ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui)
|
||||||
|
|
|
@ -22,8 +22,11 @@
|
||||||
|
|
||||||
// KF
|
// KF
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
#include <PulseAudioQt/Context>
|
#include <PulseAudioQt/Context>
|
||||||
#include <PulseAudioQt/Sink>
|
#include <PulseAudioQt/Sink>
|
||||||
|
#endif
|
||||||
// Qt
|
// Qt
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
@ -94,6 +97,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np)
|
||||||
player->setVolume(100);
|
player->setVolume(100);
|
||||||
player->play();
|
player->play();
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
const auto sinks = PulseAudioQt::Context::instance()->sinks();
|
const auto sinks = PulseAudioQt::Context::instance()->sinks();
|
||||||
QVector<PulseAudioQt::Sink*> mutedSinks;
|
QVector<PulseAudioQt::Sink*> mutedSinks;
|
||||||
|
|
||||||
|
@ -110,6 +114,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np)
|
||||||
sink->setMuted(true);
|
sink->setMuted(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO: ensure to use built-in loudspeakers
|
// TODO: ensure to use built-in loudspeakers
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue