diff --git a/PiP-Tool/DataModel/AudioControls.cs b/PiP-Tool/DataModel/AudioControls.cs index e92e59c..2d36403 100644 --- a/PiP-Tool/DataModel/AudioControls.cs +++ b/PiP-Tool/DataModel/AudioControls.cs @@ -97,18 +97,18 @@ internal void GetControls(DataFlow dataFlow) if (audioControls0.Count == 0) { - Logger.Instance.Info("Found no audio control"); + Logger.Instance.Debug("Found no audio control"); DisposeControls(); return; } /* if (audioControls0.Count == 0) { - Logger.Instance.Info("Getting controls by root"); + Logger.Instance.Debug("Getting controls by root"); audioControls0 = GetControls(dataFlow, x => ( new ProcessInfo(x.ProcessID).GetRootProcess().ProcessId == this.selectedWindow.GetRootProcess().ProcessId )); - Logger.Instance.Info("Getting controls by root done"); + Logger.Instance.Debug("Getting controls by root done"); } */ @@ -125,12 +125,12 @@ internal void GetControls(DataFlow dataFlow) /* if (audioControls2.Count == 0) { - Logger.Instance.Info("Filtering controls by root"); + Logger.Instance.Debug("Filtering controls by root"); audioControls2 = audioControls0.Where(x => ( x.Process.Program == this.selectedWindow.Program && x.Process.GetRootProcess().ProcessId == this.selectedWindow.GetRootProcess().ProcessId )).ToList(); - Logger.Instance.Info("Filtering controls by root done"); + Logger.Instance.Debug("Filtering controls by root done"); } */ if (audioControls2.Count == 0) { @@ -141,27 +141,27 @@ internal void GetControls(DataFlow dataFlow) /* if (audioControls2.Count == 0) { - Logger.Instance.Info("Filtering controls by root2"); + Logger.Instance.Debug("Filtering controls by root2"); audioControls2 = audioControls0.Where(x => ( x.Process.GetRootProcess().ProcessId == this.selectedWindow.GetRootProcess().ProcessId )).ToList(); - Logger.Instance.Info("Filtering controls by root2 done"); + Logger.Instance.Debug("Filtering controls by root2 done"); } */ if (audioControls2.Count == 0) { - Logger.Instance.Info("Found no audio control"); + Logger.Instance.Debug("Found no audio control"); DisposeControls(); return; } DisposeControls(); this.audioControls = audioControls2.ToArray(); - Logger.Instance.Info("Found " + audioControls.Length + " audio controls"); + Logger.Instance.Debug("Found " + audioControls.Length + " audio controls"); foreach(AudioControl control in this.audioControls) { control.RegisterAudioSessionNotification(sessionEvents); - Logger.Instance.Info("AudioController " + control.Process.Program + " " + control.Process.Title); + Logger.Instance.Debug("AudioController " + control.Process.Program + " " + control.Process.Title); } } internal void SetAllMasterVolume(float volume) @@ -170,7 +170,7 @@ internal void SetAllMasterVolume(float volume) { if (control.MasterVolume != volume) { control.MasterVolume = volume; - Logger.Instance.Info("Notified mixer changed to " + control.MasterVolume); + Logger.Instance.Debug("Notified mixer changed to " + control.MasterVolume); } } } diff --git a/PiP-Tool/DataModel/ProcessInfo.cs b/PiP-Tool/DataModel/ProcessInfo.cs index e5fe142..473dc18 100644 --- a/PiP-Tool/DataModel/ProcessInfo.cs +++ b/PiP-Tool/DataModel/ProcessInfo.cs @@ -154,7 +154,7 @@ internal int GetParentProcessId() } this.parentProcessId = parentProcessId; - Logger.Instance.Info("Child-Parent: " + this.ProcessId + " " + this.ParentProcessId); + Logger.Instance.Debug("Child-Parent: " + this.ProcessId + " " + this.ParentProcessId); return ParentProcessId; } internal int GetParentProcessId1() diff --git a/PiP-Tool/ViewModels/VolumeViewModel.cs b/PiP-Tool/ViewModels/VolumeViewModel.cs index 517bca4..9d23f43 100644 --- a/PiP-Tool/ViewModels/VolumeViewModel.cs +++ b/PiP-Tool/ViewModels/VolumeViewModel.cs @@ -41,7 +41,7 @@ public double Volume /// public VolumeViewModel() { - Logger.Instance.Info(" ====== VolumeDialog ====== "); + Logger.Instance.Debug(" ====== VolumeDialog ====== "); MessengerInstance.Register(this, InitAudioControls); LoadedCommand = new RelayCommand(LoadedCommandExecute); @@ -81,7 +81,7 @@ private void InitAudioControls(AudioControls audioControls) this.audioControls = audioControls; MessengerInstance.Unregister(this); - Logger.Instance.Info("Init Volume : " + audioControls.SelectedWindow.Title); + Logger.Instance.Debug("Init Volume : " + audioControls.SelectedWindow.Title); this.audioControls.SessionEvents.SimpleVolumeChanged += OnMixerChanged; this.Volume = this.audioControls.MasterVolume; //this.SetSliderValue(this.audioControls.MasterVolume); @@ -108,7 +108,7 @@ private void CloseCommandExecute() private void SetMixerVolume(float volume) { - Logger.Instance.Info("Setting master volume to " + volume); + Logger.Instance.Debug("Setting master volume to " + volume); this.audioControls.SetAllMasterVolume(volume); } @@ -133,14 +133,14 @@ private void SetSliderValue(double value) private void OnMixerChanged(object sender, AudioSessionSimpleVolumeChangedEventArgs e) { - Logger.Instance.Info("Notified mixer changed to " + e.NewVolume); + Logger.Instance.Debug("Notified mixer changed to " + e.NewVolume); SetSliderValue(e.NewVolume); } public void OnSliderChanged(object sender, RoutedPropertyChangedEventArgs e) { var value = e.NewValue; - Logger.Instance.Info("Slider changed to " + value); + Logger.Instance.Debug("Slider changed to " + value); if (volume != value) volume = value; SetMixerVolume(value);