PulseAudio Qt Bindings

sink.h
1/*
2 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef SINK_H
8#define SINK_H
9
10#include "device.h"
11
12struct pa_sink_info;
13
14namespace PulseAudioQt
15{
16/**
17 * A PulseAudio sink. This class is based on https://freedesktop.org/software/pulseaudio/doxygen/structpa__sink__info.html.
18 */
19class PULSEAUDIOQT_EXPORT Sink : public Device
20{
22
23public:
24 ~Sink() override;
25
26 void setVolume(qint64 volume) override;
27
28 void setMuted(bool muted) override;
29
30 void setActivePortIndex(quint32 port_index) override;
31
32 void setChannelVolume(int channel, qint64 volume) override;
33
34 bool isDefault() const override;
35
36 void setDefault(bool enable) override;
37
38 void setChannelVolumes(const QList<qint64> &channelVolumes) override;
39
40 void switchStreams() override;
41
42 /**
43 * Index of the monitor source for this sink.
44 */
45 quint32 monitorIndex() const;
46
48 void monitorIndexChanged();
49
50private:
51 explicit Sink(QObject *parent);
52
53 std::unique_ptr<class SinkPrivate> d;
54 friend class MapBase<Sink, pa_sink_info>;
55};
56
57} // PulseAudioQt
58
59#endif // SINK_H
Maps a specific index to a specific object pointer.
Definition maps.h:78
quint32 monitorIndex() const
Index of the monitor source for this sink.
Definition sink.cpp:84
void setVolume(qint64 volume) override
Set the volume for this object.
Definition sink.cpp:46
void setActivePortIndex(quint32 port_index) override
Set the currently active port, by index.
Definition sink.cpp:57
void switchStreams() override
Switch all streams onto this Device Iterates through all relevant streams for the Device type and ass...
Definition sink.cpp:94
bool isDefault() const override
Whether this is the default device.
Definition sink.cpp:72
void setMuted(bool muted) override
Set whether this object is muted.
Definition sink.cpp:52
void setDefault(bool enable) override
Set whether this is the default device.
Definition sink.cpp:77
The primary namespace of PulseAudioQt.
Definition card.cpp:17
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.