PySide6.QtMultimedia.QAudioBufferOutput¶
- class QAudioBufferOutput¶
The
QAudioBufferOutputclass is used for capturing audio data provided byQMediaPlayer.Details
QAudioBufferOutputcan be set toQMediaPlayerin order to receive audio buffers decoded by the media player. The received audio data can be used for any processing or visualization. An audio level meter implementation can be seen in the widget based Media Player Example .QAudioBufferOutputis only supported with the FFmpeg backend.See also
Added in version 6.8.
Synopsis¶
Methods¶
def
__init__()def
format()
Signals¶
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
Constructs a new
QAudioBufferOutputobject withparent.The audio format of output audio buffers will depend on the source media file and the inner audio decoder in
QMediaPlayer.- __init__(format[, parent=None])
- Parameters:
format –
QAudioFormatparent –
QObject
Constructs a new
QAudioBufferOutputobject with audioformatandparent.If the specified
formatis valid, it will be the format of output audio buffers. Otherwise, the format of output audio buffers will depend on the source media file and the inner audio decoder inQMediaPlayer.- audioBufferReceived(buffer)¶
- Parameters:
buffer –
QAudioBuffer
Signals that a new audio
bufferhas been received fromQMediaPlayer.- format()¶
- Return type:
Gets the audio format specified in the constructor.
If the format is valid, it specifies the format of output oudio buffers.