SoundGetMute

Retrieves a mute setting of a sound device.

Setting := SoundGetMute(Component, Device)

Parameters

Component

Type: String or Integer

The component's display name and/or index. For example, 1, "Line in" or "Line in:2".

If omitted or blank, the master mute setting is retrieved.

For further details, see Component (Sound Functions).

Device

Type: String or Integer

The device's display name and/or index. For example, 1, "Speakers", "Speakers:2" or "Speakers (Example HD Audio)".

If this parameter is omitted, it defaults to the system's default device for playback (which is not necessarily device 1).

For further details, see Device (Sound Functions).

Return Value

Type: Integer (boolean) or String (empty)

This function returns 0 (not muted) or 1 (muted).

Error Handling

An exception is thrown on failure. The exception's Message property may contain one of the following:

Remarks

To discover the capabilities of the sound devices installed on the system -- such as the names and available components -- run the soundcard analysis script.

Related

Sound Functions

Examples

#1

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

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

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