/// <summary>Indicates if the system volume is muted for the device with given ID</summary> public static bool IsDeviceVolumeMuted(AudioOutputDevice audioOutputDevice) { NativeSystemVolume systemVolume = Instance.systemVolume; if (!systemVolume.ValidateDeviceID(audioOutputDevice.id)) { return(false); } return(systemVolume.IsDeviceVolumeMuted(audioOutputDevice.id)); }
/// <summary>Unmutes the device volume mute state for device with given id</summary> /// <param name="deviceID">The id of the device</param> /// <param name="sendCallback">Optional: Indicates whether to send an event callback, default is false</param> public static void UnmuteDeviceVolume(AudioOutputDevice audioOutputDevice, bool sendCallback = false) { NativeSystemVolume systemVolume = Instance.systemVolume; if (!systemVolume.ValidateDeviceID(audioOutputDevice.id)) { return; } systemVolume.SetDeviceVolumeMute(false, audioOutputDevice.id, sendCallback); }
/// <summary>Gets the device volume for the device with given ID</summary> public static float GetDeviceVolume(AudioOutputDevice audioOutputDevice) { NativeSystemVolume systemVolume = Instance.systemVolume; if (!systemVolume.ValidateDeviceID(audioOutputDevice.id)) { return(-1); } return(systemVolume.GetDeviceVolume(audioOutputDevice.id)); }