Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qaudioinput.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QAUDIOINPUTDEVICE_H
5#define QAUDIOINPUTDEVICE_H
6
7#include <QtCore/qobject.h>
8#include <QtMultimedia/qtmultimediaglobal.h>
9#include <QtMultimedia/qtaudio.h>
10
11#include <functional>
12
14
15class QAudioDevice;
17
18class Q_MULTIMEDIA_EXPORT QAudioInput : public QObject
19{
21 Q_PROPERTY(QAudioDevice device READ device WRITE setDevice NOTIFY deviceChanged)
22 Q_PROPERTY(float volume READ volume WRITE setVolume NOTIFY volumeChanged)
23 Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
24
25public:
26 explicit QAudioInput(QObject *parent = nullptr);
27 explicit QAudioInput(const QAudioDevice &deviceInfo, QObject *parent = nullptr);
28 ~QAudioInput();
29
30 QAudioDevice device() const;
31 float volume() const;
32 bool isMuted() const;
33
34public Q_SLOTS:
35 void setDevice(const QAudioDevice &device);
36 void setVolume(float volume);
37 void setMuted(bool muted);
38
40 void deviceChanged();
41 void volumeChanged(float volume);
42 void mutedChanged(bool muted);
43
45 QPlatformAudioInput *handle() const { return d; }
46 void setDisconnectFunction(std::function<void()> disconnectFunction);
48 Q_DISABLE_COPY(QAudioInput)
49 QPlatformAudioInput *d = nullptr;
50};
51
53
54#endif // QAUDIOINPUTDEVICE_H
IOBluetoothDevice * device
The QAudioDevice class provides an information about audio devices and their functionality.
\qmltype AudioInput \instantiates QAudioInput
Definition qaudioinput.h:19
The QMediaCaptureSession class allows capturing of audio and video content.
\inmodule QtCore
Definition qobject.h:103
Combined button and popup list for selecting options.
GLuint64 GLenum void * handle
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit