Commit a67a99a7 authored by Nicolas Fella's avatar Nicolas Fella

Don't try to use PulseAudioQt on Windows

parent ba30d97f
Pipeline #3529 failed with stage
in 7 minutes and 25 seconds
......@@ -11,9 +11,13 @@ target_link_libraries(kdeconnect_findthisdevice
Qt5::Core
Qt5::Multimedia
Qt5::DBus
KF5::PulseAudioQt
)
if (NOT WIN32)
target_link_libraries(kdeconnect_findthisdevice
KF5::PulseAudioQt
)
endif()
set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp)
ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui)
......
......@@ -22,8 +22,11 @@
// KF
#include <KPluginFactory>
#ifndef Q_OS_WIN
#include <PulseAudioQt/Context>
#include <PulseAudioQt/Sink>
#endif
// Qt
#include <QDBusConnection>
#include <QStandardPaths>
......@@ -94,6 +97,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np)
player->setVolume(100);
player->play();
#ifndef Q_OS_WIN
const auto sinks = PulseAudioQt::Context::instance()->sinks();
QVector<PulseAudioQt::Sink*> mutedSinks;
......@@ -110,6 +114,7 @@ bool FindThisDevicePlugin::receivePacket(const NetworkPacket& np)
sink->setMuted(true);
}
});
#endif
// TODO: ensure to use built-in loudspeakers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment