Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PwAudioProbe.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3#pragma once
4#include <PhosphorServicePipeWire/phosphorservicepipewire_export.h>
5#include <QObject>
6#include <memory>
10class PHOSPHORSERVICEPIPEWIRE_EXPORT PwAudioProbe : public QObject
11{
12 Q_OBJECT
13 Q_PROPERTY(bool listening READ listening NOTIFY activeChanged)
14 Q_PROPERTY(bool playing READ playing NOTIFY activeChanged)
15 Q_PROPERTY(qreal level READ level NOTIFY levelChanged)
16public:
17 explicit PwAudioProbe(QObject* parent = nullptr);
18 ~PwAudioProbe() override;
19 [[nodiscard]] bool listening() const;
20 [[nodiscard]] bool playing() const;
21 [[nodiscard]] qreal level() const;
22 Q_INVOKABLE void startInputTest(const QString& nodeName);
23 Q_INVOKABLE void playTestSound(const QString& nodeName);
24 Q_INVOKABLE void stop();
25Q_SIGNALS:
28 void error(const QString& message);
29
30private:
31 Q_DISABLE_COPY_MOVE(PwAudioProbe)
32 void start(const QString& nodeName, bool capture);
33 class Private;
34 std::unique_ptr<Private> d;
35};
36}
void playTestSound(const QString &nodeName)
PwAudioProbe(QObject *parent=nullptr)
void error(const QString &message)
void startInputTest(const QString &nodeName)
Definition PipeWireConnection.h:20