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
qaudiodevice.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
5#ifndef QAUDIODEVICEINFO_H
6#define QAUDIODEVICEINFO_H
7
8#include <QtCore/qobject.h>
9#include <QtCore/qbytearray.h>
10#include <QtCore/qstring.h>
11#include <QtCore/qstringlist.h>
12#include <QtCore/qlist.h>
13
14#include <QtMultimedia/qtmultimediaglobal.h>
15
16#include <QtMultimedia/qtaudio.h>
17#include <QtMultimedia/qaudioformat.h>
18
20
23
24class Q_MULTIMEDIA_EXPORT QAudioDevice
25{
27 Q_PROPERTY(QByteArray id READ id CONSTANT)
29 Q_PROPERTY(bool isDefault READ isDefault CONSTANT)
30 Q_PROPERTY(Mode mode READ mode CONSTANT)
31public:
32 enum Mode {
35 Output
36 };
38
42
43 QAudioDevice(QAudioDevice &&other) noexcept = default;
44 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QAudioDevice)
45 void swap(QAudioDevice &other) noexcept
46 { d.swap(other.d); }
47
49
50 bool operator==(const QAudioDevice &other) const;
51 bool operator!=(const QAudioDevice &other) const;
52
53 bool isNull() const;
54
55 QByteArray id() const;
56 QString description() const;
57
58 bool isDefault() const;
60
61 bool isFormatSupported(const QAudioFormat &format) const;
63
64 int minimumSampleRate() const;
65 int maximumSampleRate() const;
66 int minimumChannelCount() const;
67 int maximumChannelCount() const;
68 QList<QAudioFormat::SampleFormat> supportedSampleFormats() const;
70
71 const QAudioDevicePrivate *handle() const { return d.get(); }
72private:
73 friend class QAudioDevicePrivate;
75 QExplicitlySharedDataPointer<QAudioDevicePrivate> d;
76};
77
78#ifndef QT_NO_DEBUG_STREAM
79Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug dbg, QAudioDevice::Mode mode);
80#endif
81
83
84#endif // QAUDIODEVICEINFO_H
QAudioFormat::ChannelConfig channelConfiguration
QAudioFormat preferredFormat
QList< QAudioFormat::SampleFormat > supportedSampleFormats
The QAudioDevice class provides an information about audio devices and their functionality.
Mode
Describes the mode of this device.
void swap(QAudioDevice &other) noexcept
Swaps the audio device with the other.
QAudioDevice & operator=(const QAudioDevice &other)
Sets the QAudioDevice object to be equal to other.
const QAudioDevicePrivate * handle() const
The QAudioFormat class stores audio stream parameter information.
ChannelConfig
\variable QAudioFormat::NChannelPositions
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug dbg, QAudioDevice::Mode mode)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
GLenum mode
GLenum GLuint id
[7]
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat p
[1]
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
#define QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_GADGET
QSharedPointer< T > other(t)
[5]
this swap(other)