SoundGetMute

サウンドデバイスのミュート設定を取得します。

Setting := SoundGetMute(Component, Device)

パラメータ

コンポーネント

型:文字列または整数

If blank or omitted, it defaults to the master mute setting. Otherwise, specify the component's display name and/or index, e.g. 1, "Line in" or "Line in:2".

詳しくは「コンポーネント(サウンド機能)」をご覧ください。

Device

型:文字列または整数

If blank or omitted, it defaults to the system's default device for playback (which is not necessarily device 1). Otherwise, specify the device's display name and/or index, e.g. 1, "Speakers", "Speakers:2" or "Speakers (Example HD Audio)".

詳しくはデバイス(サウンド機能)をご覧ください。

戻り値

型:整数(ブーリアン)

This function returns 0 (false) for unmuted or 1 (true) for muted.

エラー処理

A TargetError is thrown if the device or component could not be found or if the component does not support this control type. Otherwise, an OSError is thrown on failure.

備考

システムにインストールされているサウンドデバイスの機能(名前や使用可能なコンポーネントなど)を調べるには、サウンドカード解析スクリプトを実行します。

サウンド機能

デフォルトの再生デバイスがミュートされているかどうかをチェックする。

master_mute := SoundGetMute()
if master_mute
    MsgBox "The default playback device is muted."
else
    MsgBox "The default playback device is not muted."

"Line In pass-through"がミュートされているかどうかをチェックします。

if SoundGetMute("Line In") = 0
    MsgBox "Line In pass-through is not muted."

マイク(録音)がミュートされているかどうかをチェックします。

if SoundGetMute( , "Microphone") = 0
    MsgBox "The microphone (recording) is not muted."