예제 #1
0
        public void MuteUnmuteAppVolume()
        {
            var pid = ProcessesService.GetActiveProcessID();

            if (!pid.HasValue)
            {
                return;
            }
            SetApplicationMute(pid.Value, !(GetApplicationMute(pid.Value) ?? false));
        }
예제 #2
0
        public void LowerAppVolume()
        {
            var pid = ProcessesService.GetActiveProcessID();

            if (!pid.HasValue)
            {
                return;
            }
            var vol = GetApplicationVolume(pid.Value);

            vol = Math.Max(0, vol.GetValueOrDefault(0) - 5);
            SetApplicationVolume(pid.Value, vol.Value);
        }