summaryrefslogtreecommitdiffstats
path: root/src/PulseAudioQt/sink.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/PulseAudioQt/sink.h')
-rw-r--r--src/PulseAudioQt/sink.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/PulseAudioQt/sink.h b/src/PulseAudioQt/sink.h
new file mode 100644
index 0000000..9551763
--- /dev/null
+++ b/src/PulseAudioQt/sink.h
@@ -0,0 +1,57 @@
+/*
+ SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
+
+ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
+*/
+
+#ifndef SINK_H
+#define SINK_H
+
+#include "device.h"
+
+struct pa_sink_info;
+
+namespace PulseAudioQt
+{
+/**
+ * A PulseAudio sink. This class is based on https://freedesktop.org/software/pulseaudio/doxygen/structpa__sink__info.html.
+ */
+class PULSEAUDIOQT_EXPORT Sink : public Device
+{
+ Q_OBJECT
+
+public:
+ ~Sink();
+
+ void setVolume(qint64 volume) override;
+
+ void setMuted(bool muted) override;
+
+ void setActivePortIndex(quint32 port_index) override;
+
+ void setChannelVolume(int channel, qint64 volume) override;
+
+ bool isDefault() const override;
+
+ void setDefault(bool enable) override;
+
+ void setChannelVolumes(const QVector<qint64> &channelVolumes) override;
+
+ /**
+ * Index of the monitor source for this sink.
+ */
+ quint32 monitorIndex() const;
+
+Q_SIGNALS:
+ void monitorIndexChanged();
+
+private:
+ explicit Sink(QObject *parent);
+
+ class SinkPrivate *const d;
+ friend class MapBase<Sink, pa_sink_info>;
+};
+
+} // PulseAudioQt
+
+#endif // SINK_H