即静音或不是静音的状态 有大佬熟悉的没。。
private bool IsMuted()
{
var enumerator = new MMDeviceEnumerator();
IEnumerable<MMDevice> speakDevices = enumerator.EnumerateAudioEndPoints(DataFlow.Render, DeviceState.Active).ToArray();
MMDevice mMDevice = speakDevices.ToList()[0];
return mMDevice.AudioEndpointVolume.Mute;
}
这个可以获取到音量状态