QAudioBufferOutput Class
QAudioBufferOutput クラスは、QMediaPlayer から提供されるオーディオデータをキャプチャするために使用されます。詳細...
| ヘッダー: | #include <QAudioBufferOutput> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
| qmake: | QT += multimedia |
| 以下のように: | Qt 6.8 |
| 継承元: | QObject |
パブリック関数
| QAudioBufferOutput(QObject *parent = nullptr) | |
| QAudioBufferOutput(const QAudioFormat &format, QObject *parent = nullptr) | |
| virtual | ~QAudioBufferOutput() override |
| QAudioFormat | format() const |
シグナル
| void | audioBufferReceived(const QAudioBuffer &buffer) |
詳細な説明
QAudioBufferOutput を `QMediaPlayer ` に設定することで、メディアプレーヤーによってデコードされたオーディオバッファを受信できます。受信したオーディオデータは、任意の処理や可視化に利用できます。オーディオレベルメーターの実装例は、ウィジェットベースの「Media Player Example」で確認できます。
QAudioBufferOutputは、FFmpegバックエンドでのみサポートされています。
QMediaPlayer 、QMediaPlayer::setAudioBufferOutput 、およびQAudioBufferも参照してください 。
メンバ関数のドキュメント
[explicit] QAudioBufferOutput::QAudioBufferOutput(QObject *parent = nullptr)
parent を使用して、新しい QAudioBufferOutput オブジェクトを作成します。
出力オーディオバッファのオーディオ形式は、ソースメディアファイルおよびQMediaPlayer 内の内部オーディオデコーダによって異なります。
[explicit] QAudioBufferOutput::QAudioBufferOutput(const QAudioFormat &format, QObject *parent = nullptr)
オーディオformat およびparent を指定して、新しいQAudioBufferOutputオブジェクトを作成します。
指定されたformat が有効な場合、それが出力オーディオバッファのフォーマットとなります。そうでない場合、出力オーディオバッファのフォーマットは、ソースメディアファイルおよびQMediaPlayer 内の内部オーディオデコーダによって決まります。
[override virtual noexcept] QAudioBufferOutput::~QAudioBufferOutput()
オーディオバッファ出力オブジェクトを破棄します。
[signal] void QAudioBufferOutput::audioBufferReceived(const QAudioBuffer &buffer)
QMediaPlayer から新しいオーディオbuffer が受信されたことを通知します。
QAudioFormat QAudioBufferOutput::format() const
コンストラクタで指定されたオーディオ形式を取得します。
フォーマットが有効な場合、出力オーディオバッファのフォーマットを指定します。
© 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.