QAudioListener#
Defines the position and orientation of the person listening to a sound field defined by QAudioEngine
. More…
Synopsis#
Functions#
def
engine
()def
position
()def
rotation
()def
setPosition
(pos)def
setRotation
(q)
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:
engine –
PySide6.QtSpatialAudio.QAudioEngine
Creates a listener for the spatial audio engine for engine
.
- PySide6.QtSpatialAudio.QAudioListener.engine()#
- Return type:
Returns the engine associated with this listener.
- PySide6.QtSpatialAudio.QAudioListener.position()#
- Return type:
Returns the current position of the listener.
See also
- PySide6.QtSpatialAudio.QAudioListener.rotation()#
- Return type:
Returns the listener’s orientation in 3D space.
See also
- PySide6.QtSpatialAudio.QAudioListener.setPosition(pos)#
- Parameters:
pos –
PySide6.QtGui.QVector3D
Sets the listener’s position in 3D space to pos
. Units are in centimeters by default.
See also
- PySide6.QtSpatialAudio.QAudioListener.setRotation(q)#
- Parameters:
Sets the listener’s orientation in 3D space to q
.
See also