このページでは

QAudioInput Class

オーディオ用の入力チャンネルを表します。詳細...

ヘッダー: #include <QAudioInput>
CMake: find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
qmake: QT += multimedia
QML内: AudioInput
継承元: QObject

プロパティ

パブリック関数

QAudioDevice device() const
bool isMuted() const
float volume() const

パブリックスロット

void setDevice(const QAudioDevice &device)
void setMuted(bool muted)
void setVolume(float volume)

シグナル

void deviceChanged()
void mutedChanged(bool muted)
void volumeChanged(float volume)

詳細な説明

このクラスは、QMediaCaptureSession と組み合わせて使用できる入力チャンネルを表します。これを使用すると、使用する物理入力デバイスの選択、チャンネルのミュート、およびチャンネルの音量変更を行うことができます。

注:WebAssemblyプラットフォームでは 、その非同期的な性質上、オーディオ入力のリストの準備が整った時点でQMediaDevices::audioInputsChanged()シグナルが発信されます。ユーザーの権限が必要です。セキュアなhttpsコンテキストでのみ動作します。

QAudioOutputも参照してください 。

プロパティのドキュメント

device : QAudioDevice

このプロパティには、この入力に接続されているオーディオデバイスが格納されます。

deviceプロパティは、この入力に接続されているオーディオデバイスを表します。このプロパティを使用すると、QMediaDevices::audioInputs()のリストから入力デバイスを選択できます。

このプロパティをデフォルトで生成されたQAudioDevice オブジェクトに設定することで、システムのデフォルトのオーディオ入力を選択できます。

アクセス関数:

QAudioDevice device() const
void setDevice(const QAudioDevice &device)

通知シグナル:

void deviceChanged()

muted : bool

このプロパティは、現在のメディアのミュート状態を保持します。

入力がミュートされている場合、値は `true ` となり、そうでない場合は `false` となります。

アクセス関数:

bool isMuted() const
void setMuted(bool muted)

通知シグナル:

void mutedChanged(bool muted)

volume : float

このプロパティは、オーディオ入力の音量を返します。

アクセス関数:

float volume() const
void setVolume(float volume)

通知シグナル:

void volumeChanged(float volume)

© 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.