diff options
author | Simon Rettberg | 2022-08-18 20:27:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-08-18 20:27:25 +0200 |
commit | c48cebd620d3f5330c104d85ac32f0aaffadaa14 (patch) | |
tree | 8fc74d8aa05fcdc75bfcdf93fdc89c0f071692eb /src/PulseAudioQt/sink.h | |
parent | When changing default output of card, also set default sink (diff) | |
download | pavucontrol-slx-c48cebd620d3f5330c104d85ac32f0aaffadaa14.tar.gz pavucontrol-slx-c48cebd620d3f5330c104d85ac32f0aaffadaa14.tar.xz pavucontrol-slx-c48cebd620d3f5330c104d85ac32f0aaffadaa14.zip |
Replace everything with new "slxmix" (work in progress)
Diffstat (limited to 'src/PulseAudioQt/sink.h')
-rw-r--r-- | src/PulseAudioQt/sink.h | 57 |
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 |