File indexing completed on 2024-10-13 10:52:11
0001 /* 0002 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SINK_H 0008 #define SINK_H 0009 0010 #include "device.h" 0011 #include <pulse/channelmap.h> 0012 0013 namespace QPulseAudio 0014 { 0015 class Sink : public Device 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit Sink(QObject *parent); 0020 virtual ~Sink(); 0021 0022 void update(const pa_sink_info *info); 0023 void setVolume(qint64 volume) override; 0024 void setMuted(bool muted) override; 0025 void setActivePortIndex(quint32 port_index) override; 0026 void setChannelVolume(int channel, qint64 volume) override; 0027 void setChannelVolumes(const QVector<qint64> &channelVolumes) override; 0028 0029 bool isDefault() const override; 0030 void setDefault(bool enable) override; 0031 0032 void switchStreams() override; 0033 0034 quint32 monitorIndex() const; 0035 0036 Q_SIGNALS: 0037 void monitorIndexChanged(); 0038 0039 private: 0040 quint32 m_monitorIndex = -1; 0041 }; 0042 0043 } // QPulseAudio 0044 0045 #endif // SINK_H