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 QLISTENER_H
4#define QLISTENER_H
5
6#include <QtSpatialAudio/qtspatialaudioglobal.h>
7#include <QtCore/QObject>
8#include <QtMultimedia/qaudioformat.h>
9#include <QtGui/qvector3d.h>
10#include <QtGui/qquaternion.h>
11
12QT_BEGIN_NAMESPACE
13
14class QAudioEngine;
15
16class QAudioListenerPrivate;
17class Q_SPATIALAUDIO_EXPORT QAudioListener : public QObject
18{
19public:
20 explicit QAudioListener(QAudioEngine *engine);
21 ~QAudioListener();
22
23 void setPosition(QVector3D pos);
24 QVector3D position() const;
25 void setRotation(const QQuaternion &q);
26 QQuaternion rotation() const;
27
28 QAudioEngine *engine() const;
29
30private:
31 void setEngine(QAudioEngine *engine);
32 QAudioListenerPrivate *d = nullptr;
33};
34
35QT_END_NAMESPACE
36
37#endif
38

source code of qtmultimedia/src/spatialaudio/qaudiolistener.h