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#ifndef QPLATFORMAUDIOINPUT_H
4#define QPLATFORMAUDIOINPUT_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qtmultimediaglobal_p.h>
18#include <qaudiodevice.h>
19
20#include <functional>
21
22QT_BEGIN_NAMESPACE
23
24class QAudioInput;
25
26class Q_MULTIMEDIA_EXPORT QPlatformAudioInput
27{
28public:
29 QPlatformAudioInput(QAudioInput *qq) : q(qq) {}
30 virtual ~QPlatformAudioInput() {}
31
32 virtual void setAudioDevice(const QAudioDevice &/*device*/) {}
33 virtual void setMuted(bool /*muted*/) {}
34 virtual void setVolume(float /*volume*/) {}
35
36 QAudioInput *q = nullptr;
37 QAudioDevice device;
38 float volume = 1.;
39 bool muted = false;
40 std::function<void()> disconnectFunction;
41};
42
43QT_END_NAMESPACE
44
45
46#endif // QPLATFORMAUDIOINPUT_H
47

source code of qtmultimedia/src/multimedia/platform/qplatformaudioinput_p.h