检索声音设备的静音设置.
Setting := SoundGetMute(Component, Device)
组件的显示名称和/或索引. 例如, 1, "Line in" 或 "Line in:2".
如果省略或为空, 则检索主静音设置.
有关详情, 请参阅 Component (Sound 函数).
设备的显示名称和/或索引. 例如, 1, "Speakers", "Speakers:2" 或 "Speakers (Example HD Audio)".
如果省略该参数, 则它默认为系统的默认回放设备(不一定是设备 1).
有关详情, 请参阅 Device (Sound 函数).
函数返回 0(未静音) 或 1(静音).
失败时可能会抛出以下异常之一:
| Error 类 | 消息 |
|---|---|
| TargetError | Device not found(无法找到设备) |
| Component not found(无法找到组件) | |
| Component doesn't support this control type(组件不支持此控件类型) | |
| OSError | System-generated.(由系统生成) |
要发现系统上安装的声音设备的功能 -- 比如名称和可用的组件 -- 请运行这个声卡分析脚本.
master_mute := SoundGetMute()
if master_mute
MsgBox "The default playback device is muted."
else
MsgBox "The default playback device is not muted."