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 | #ifndef QAUDIOROOM_P_H |
4 | #define QAUDIOROOM_P_H |
5 | |
6 | // W A R N I N G |
7 | // ------------- |
8 | // |
9 | // This file is not part of the Qt API. It exists purely as an |
10 | // implementation detail. This header file may change from version to |
11 | // version without notice, or even be removed. |
12 | // |
13 | // We mean it. |
14 | // |
15 | |
16 | #include <qtspatialaudioglobal_p.h> |
17 | #include <qaudioroom.h> |
18 | #include <qaudioengine_p.h> |
19 | #include <QtGui/qquaternion.h> |
20 | |
21 | #include <resonance_audio.h> |
22 | #include "platforms/common/room_effects_utils.h" |
23 | #include "platforms/common/room_properties.h" |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | class QAudioRoomPrivate |
28 | { |
29 | public: |
30 | static QAudioRoomPrivate *get(const QAudioRoom *r) { return r->d; } |
31 | |
32 | QAudioEngine *engine = nullptr; |
33 | vraudio::RoomProperties roomProperties; |
34 | bool dirty = true; |
35 | |
36 | vraudio::ReverbProperties reverb; |
37 | vraudio::ReflectionProperties reflections; |
38 | |
39 | float m_wallOcclusion[6] = { -1.f, -1.f, -1.f, -1.f, -1.f, -1.f }; |
40 | float m_wallDampening[6] = { -1.f, -1.f, -1.f, -1.f, -1.f, -1.f }; |
41 | |
42 | float wallOcclusion(QAudioRoom::Wall wall) const; |
43 | float wallDampening(QAudioRoom::Wall wall) const; |
44 | |
45 | void update(); |
46 | }; |
47 | |
48 | QT_END_NAMESPACE |
49 | |
50 | #endif |
51 | |