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 QQUICK3DLISTENER_H
4#define QQUICK3DLISTENER_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qquick3dnode_p.h>
18#include <QtGui/qvector3d.h>
19
20#include <qaudiolistener.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuick3DAudioListener : public QQuick3DNode
25{
26 Q_OBJECT
27 QML_NAMED_ELEMENT(AudioListener)
28
29public:
30 QQuick3DAudioListener();
31 ~QQuick3DAudioListener();
32
33 QAudioListener *listener() { return m_listener; }
34protected:
35 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *) override { return nullptr; }
36
37protected Q_SLOTS:
38 void updatePosition();
39 void updateRotation();
40
41private:
42 QAudioListener *m_listener;
43};
44
45QT_END_NAMESPACE
46
47#endif
48

source code of qtmultimedia/src/spatialaudioquick3d/qquick3daudiolistener_p.h