SoundSetMute

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

SoundSetMute NewSetting , Component, Device

パラメータ

NewSetting

型:整数

以下のいずれかの値:

コンポーネント

型:文字列または整数

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)".

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

エラー処理

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.

備考

デフォルトの再生デバイスのマスターミュート設定を切り替える別の方法は、以下の例のように、スクリプトにキーストロークを送信させることです:

Send "{Volume_Mute}"  ; Mute/unmute the master volume.

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

現在のミュート設定を取得するには、SoundGetMuteを使います。

サウンド機能

Turns on the master mute.

SoundSetMute true

Turns off the master mute.

SoundSetMute false

Toggles the master mute (sets it to the opposite of its current state).

SoundSetMute -1

ミュート・ライン・イン

SoundSetMute true, "Line In"

マイク録音をミュートする。

SoundSetMute true,, "Microphone"