| 1 | // Copyright (C) 2022 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QSPATIALAUDIOSOUNDSOURCE_P_H |
| 5 | #define QSPATIALAUDIOSOUNDSOURCE_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists for the convenience |
| 12 | // of other Qt classes. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <qspatialsound.h> |
| 19 | #include <qambientsound_p.h> |
| 20 | #include <qaudioengine_p.h> |
| 21 | #include <qurl.h> |
| 22 | #include <qvector3d.h> |
| 23 | #include <qquaternion.h> |
| 24 | #include <qaudiobuffer.h> |
| 25 | #include <qaudiodevice.h> |
| 26 | #include <qmutex.h> |
| 27 | |
| 28 | QT_BEGIN_NAMESPACE |
| 29 | |
| 30 | class QAudioDecoder; |
| 31 | class QAudioEnginePrivate; |
| 32 | |
| 33 | class QSpatialSoundPrivate : public QAmbientSoundPrivate |
| 34 | { |
| 35 | public: |
| 36 | QSpatialSoundPrivate(QObject *parent) |
| 37 | : QAmbientSoundPrivate(parent, 1) |
| 38 | {} |
| 39 | |
| 40 | static QSpatialSoundPrivate *get(QSpatialSound *soundSource) |
| 41 | { return soundSource ? soundSource->d : nullptr; } |
| 42 | |
| 43 | QVector3D pos; |
| 44 | QQuaternion rotation; |
| 45 | QSpatialSound::DistanceModel distanceModel = QSpatialSound::DistanceModel::Logarithmic; |
| 46 | float size = .1f; |
| 47 | float distanceCutoff = 50.f; |
| 48 | float manualAttenuation = 0.f; |
| 49 | float occlusionIntensity = 0.f; |
| 50 | float directivity = 0.f; |
| 51 | float directivityOrder = 1.f; |
| 52 | float nearFieldGain = 0.f; |
| 53 | float wallDampening = 1.f; |
| 54 | float wallOcclusion = 0.f; |
| 55 | |
| 56 | void updateDistanceModel(); |
| 57 | void updateRoomEffects(); |
| 58 | }; |
| 59 | |
| 60 | QT_END_NAMESPACE |
| 61 | |
| 62 | #endif |
| 63 |
