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 <qaudioengine_p.h> |
20 | #include <qurl.h> |
21 | #include <qvector3d.h> |
22 | #include <qquaternion.h> |
23 | #include <qaudiobuffer.h> |
24 | #include <qaudiodevice.h> |
25 | #include <qmutex.h> |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | class QAudioDecoder; |
30 | class QAudioEnginePrivate; |
31 | |
32 | class QSpatialSoundPrivate : public QAmbientSoundPrivate |
33 | { |
34 | public: |
35 | QSpatialSoundPrivate(QObject *parent) |
36 | : QAmbientSoundPrivate(parent, 1) |
37 | {} |
38 | |
39 | static QSpatialSoundPrivate *get(QSpatialSound *soundSource) |
40 | { return soundSource ? soundSource->d : nullptr; } |
41 | |
42 | QVector3D pos; |
43 | QQuaternion rotation; |
44 | QSpatialSound::DistanceModel distanceModel = QSpatialSound::DistanceModel::Logarithmic; |
45 | float size = .1f; |
46 | float distanceCutoff = 50.f; |
47 | float manualAttenuation = 0.f; |
48 | float occlusionIntensity = 0.f; |
49 | float directivity = 0.f; |
50 | float directivityOrder = 1.f; |
51 | float nearFieldGain = 0.f; |
52 | float wallDampening = 1.f; |
53 | float wallOcclusion = 0.f; |
54 | |
55 | void updateDistanceModel(); |
56 | void updateRoomEffects(); |
57 | }; |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif |
62 |