QAudioBufferOutput Class
Die Klasse QAudioBufferOutput wird für die Erfassung von Audiodaten verwendet, die von QMediaPlayer bereitgestellt werden. Mehr...
Kopfzeile: | #include <QAudioBufferOutput> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
Seit: | Qt 6.8 |
Vererbt: | QObject |
Öffentliche Funktionen
QAudioBufferOutput(QObject *parent = nullptr) | |
QAudioBufferOutput(const QAudioFormat &format, QObject *parent = nullptr) | |
virtual | ~QAudioBufferOutput() override |
QAudioFormat | format() const |
Signale
void | audioBufferReceived(const QAudioBuffer &buffer) |
Detaillierte Beschreibung
QAudioBufferOutput kann auf QMediaPlayer gesetzt werden, um vom Mediaplayer dekodierte Audiopuffer zu empfangen. Die empfangenen Audiodaten können für eine beliebige Verarbeitung oder Visualisierung verwendet werden.
QAudioBufferOutput wird nur mit dem FFmpeg-Backend unterstützt.
Siehe auch QMediaPlayer, QMediaPlayer::setAudioBufferOutput, und QAudioBuffer.
Dokumentation der Mitgliedsfunktionen
[explicit]
QAudioBufferOutput::QAudioBufferOutput(QObject *parent = nullptr)
Konstruiert ein neues QAudioBufferOutput-Objekt mit parent.
Das Audioformat des ausgegebenen Audiopuffers hängt von der Quellmediendatei und dem inneren Audiodecoder in QMediaPlayer ab.
[explicit]
QAudioBufferOutput::QAudioBufferOutput(const QAudioFormat &format, QObject *parent = nullptr)
Konstruiert ein neues QAudioBufferOutput-Objekt mit Audio format und parent.
Wenn das angegebene format gültig ist, wird es das Format der Ausgabe-Audiopuffer sein. Andernfalls hängt das Format der ausgegebenen Audiopuffer von der Quellmediendatei und dem inneren Audiodecoder in QMediaPlayer ab.
[override virtual noexcept]
QAudioBufferOutput::~QAudioBufferOutput()
Zerstört das Audio-Puffer-Ausgabeobjekt.
[signal]
void QAudioBufferOutput::audioBufferReceived(const QAudioBuffer &buffer)
Signalisiert, dass ein neues Audio buffer von QMediaPlayer empfangen wurde.
QAudioFormat QAudioBufferOutput::format() const
Ruft das im Konstruktor angegebene Audioformat ab.
Wenn das Format gültig ist, gibt es das Format der ausgegebenen Audiopuffer an.
© 2025 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.