Share via


IWMPSettings::mute 속성

[이 페이지와 연결된 기능인 Windows 미디어 플레이어 SDK는 레거시 기능입니다. MediaPlayer로 대체되었습니다. MediaPlayer는 Windows 10 및 Windows 11 최적화되었습니다. 가능한 경우 새 코드에서 Windows 미디어 플레이어 SDK 대신 MediaPlayer를 사용하는 것이 좋습니다. 가능한 경우 레거시 API를 사용하는 기존 코드를 다시 작성하여 새 API를 사용하도록 제안합니다.]

음소거 속성은 오디오 음소거 여부를 나타내는 값을 가져오거나 설정합니다.

구문

public System.Boolean mute {get; set;}

Public Property mute As System.Boolean

속성 값

오디오 음소거 여부를 나타내는 System.Boolean 값입니다. 기본값은 false입니다.

예제

다음 예제에서는 검사 상자를 만들고 상자의 선택된 상태가 변경되면 음소거 속성을 전환하여 오디오를 음소거 및 음소거 해제합니다. AxWMPLib.AxWindowsMediaPlayer 개체는 player라는 변수로 표시됩니다.

private void Mute_CheckStateChanged(object sender, System.EventArgs e)
{
    System.Windows.Forms.CheckBox Mute = (System.Windows.Forms.CheckBox)sender;

    // Change the check box text depending on the checked state.
    Mute.Text = Mute.Checked ? "Un-mute Audio" : Mute.Text = "Mute Audio";

    // Use the checked state to set the mute property. 
    player.settings.mute = Mute.Checked;
}

Public Sub Mute_CheckStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Mute.CheckStateChanged

    Dim cb As System.Windows.Forms.CheckBox = sender

    '  Change the check box text depending on the checked state.
    If (cb.Checked) Then

        cb.Text = "Un-mute Audio"

    Else

        cb.Text = "Mute Audio"

    End If

    '  Use the checked state to set the mute property. 
    player.settings.mute = cb.Checked

End Sub

요구 사항

요구 사항
버전
Windows 미디어 플레이어 9 시리즈 이상
네임스페이스
WMPLib
어셈블리
Interop.WMPLib.dll(Interop.WMPLib.dll.dll)

추가 정보

IWMPSettings 인터페이스(VB 및 C#)

IWMPSettings.rate(VB 및 C#)