このページでは

QAudioListener Class

QAudioEngine で定義された音場を聞く人の位置と向きを定義します。詳細...

ヘッダー: #include <QAudioListener>
CMake: find_package(Qt6 REQUIRED COMPONENTS SpatialAudio)
target_link_libraries(mytarget PRIVATE Qt6::SpatialAudio)
qmake: QT += spatialaudio
継承元: QObject

パブリック関数

QAudioListener(QAudioEngine *engine)
virtual ~QAudioListener() override
QAudioEngine *engine() const
QVector3D position() const
QQuaternion rotation() const
void setPosition(QVector3D pos)
void setRotation(const QQuaternion &q)

詳細な説明

QAudioEngine は、音場を聞く人の位置と向きを定義するリスナーを、正確に1つ持つことができます。

メンバー関数のドキュメント

[explicit] QAudioListener::QAudioListener(QAudioEngine *engine)

engine 用の空間オーディオエンジン向けリスナーを作成します。

注: 有効なQAudioEngine

[override virtual noexcept] QAudioListener::~QAudioListener()

リスナーを破棄します。

QAudioEngine *QAudioListener::engine() const

このリスナーに関連付けられているエンジンを返します。

QVector3D QAudioListener::position() const

リスナーの現在の位置を返します。

setPosition()も参照してください 。

QQuaternion QAudioListener::rotation() const

3D空間におけるリスナーの向きを返します。

setRotation()も参照してください 。

void QAudioListener::setPosition(QVector3D pos)

3D空間におけるリスナーの位置をpos に設定します。単位はデフォルトでセンチメートルです。

position() およびQAudioEngine::distanceScaleも参照してください 。

void QAudioListener::setRotation(const QQuaternion &q)

3D空間におけるリスナーの向きをq に設定します。

rotation()も参照してください 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.