| 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 | #ifndef QAUDIO_H |
| 5 | #define QAUDIO_H |
| 6 | |
| 7 | #if 0 |
| 8 | #pragma qt_class(QAudio) |
| 9 | #endif |
| 10 | |
| 11 | #include <QtMultimedia/qtmultimediaglobal.h> |
| 12 | |
| 13 | #include <QtCore/qmetatype.h> |
| 14 | |
| 15 | QT_BEGIN_NAMESPACE |
| 16 | |
| 17 | //QTM_SYNC_HEADER_EXPORT QAudio |
| 18 | |
| 19 | // Class forward declaration required for QDoc bug |
| 20 | class QString; |
| 21 | |
| 22 | #if defined(Q_QDOC) |
| 23 | namespace QtAudio |
| 24 | #else |
| 25 | namespace QAudio |
| 26 | #endif |
| 27 | { |
| 28 | enum Error { NoError, OpenError, IOError, UnderrunError, FatalError }; |
| 29 | enum State { ActiveState, SuspendedState, StoppedState, IdleState }; |
| 30 | |
| 31 | enum VolumeScale { |
| 32 | LinearVolumeScale, |
| 33 | CubicVolumeScale, |
| 34 | LogarithmicVolumeScale, |
| 35 | DecibelVolumeScale |
| 36 | }; |
| 37 | |
| 38 | Q_MULTIMEDIA_EXPORT float convertVolume(float volume, VolumeScale from, VolumeScale to); |
| 39 | } |
| 40 | |
| 41 | #if !defined(Q_QDOC) |
| 42 | namespace QtAudio = QAudio; |
| 43 | #endif |
| 44 | |
| 45 | #ifndef QT_NO_DEBUG_STREAM |
| 46 | Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug dbg, QtAudio::Error error); |
| 47 | Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug dbg, QtAudio::State state); |
| 48 | Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug dbg, QtAudio::VolumeScale role); |
| 49 | #endif |
| 50 | |
| 51 | QT_END_NAMESPACE |
| 52 | |
| 53 | #endif // QAUDIO_H |
| 54 | |