QAudioListener#

Defines the position and orientation of the person listening to a sound field defined by QAudioEngine . More

Inheritance diagram of PySide6.QtSpatialAudio.QAudioListener

Synopsis#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

A QAudioEngine can have exactly one listener that defines the position and orientation of the person listening to the sound field.

class PySide6.QtSpatialAudio.QAudioListener(engine)#
Parameters:

enginePySide6.QtSpatialAudio.QAudioEngine

Creates a listener for the spatial audio engine for engine.

PySide6.QtSpatialAudio.QAudioListener.engine()#
Return type:

PySide6.QtSpatialAudio.QAudioEngine

Returns the engine associated with this listener.

PySide6.QtSpatialAudio.QAudioListener.position()#
Return type:

PySide6.QtGui.QVector3D

Returns the current position of the listener.

See also

setPosition()

PySide6.QtSpatialAudio.QAudioListener.rotation()#
Return type:

PySide6.QtGui.QQuaternion

Returns the listener’s orientation in 3D space.

See also

setRotation()

PySide6.QtSpatialAudio.QAudioListener.setPosition(pos)#
Parameters:

posPySide6.QtGui.QVector3D

Sets the listener’s position in 3D space to pos. Units are in centimeters by default.

PySide6.QtSpatialAudio.QAudioListener.setRotation(q)#
Parameters:

qPySide6.QtGui.QQuaternion

Sets the listener’s orientation in 3D space to q.

See also

rotation()