diff --git a/src/context.h b/src/context.h --- a/src/context.h +++ b/src/context.h @@ -23,7 +23,6 @@ #include #include "kf5pulseaudioqt_export.h" -#include "pulse/volume.h" namespace PulseAudioQt { @@ -38,6 +37,10 @@ class Module; class Server; +KF5PULSEAUDIOQT_EXPORT qint64 normalVolume(); +KF5PULSEAUDIOQT_EXPORT qint64 minimumVolume(); +KF5PULSEAUDIOQT_EXPORT qint64 maximumVolume(); + class KF5PULSEAUDIOQT_EXPORT Context : public QObject { Q_OBJECT @@ -47,10 +50,6 @@ static Context *instance(); - static const qint64 NormalVolume = PA_VOLUME_NORM; - static const qint64 MinimalVolume = 0; - static const qint64 MaximalVolume = (PA_VOLUME_NORM / 100.0) * 150; - void ref(); void unref(); diff --git a/src/context.cpp b/src/context.cpp --- a/src/context.cpp +++ b/src/context.cpp @@ -45,6 +45,20 @@ Context *s_context = nullptr; +qint64 normalVolume() +{ + return PA_VOLUME_NORM; +} + +qint64 minimumVolume() +{ + return 0; +} + +qint64 maximumVolume() +{ + return (PA_VOLUME_NORM / 100.0) * 150; +} static bool isGoodState(int eol) { if (eol < 0) { diff --git a/src/context_p.h b/src/context_p.h --- a/src/context_p.h +++ b/src/context_p.h @@ -32,11 +32,6 @@ namespace PulseAudioQt { - static const qint64 NormalVolume = PA_VOLUME_NORM; - static const qint64 MinimalVolume = 0; - static const qint64 MaximalVolume = (PA_VOLUME_NORM / 100.0) * 150; - - class ContextPrivate { public: