public PlaybackControlViewModel(IPlaybackManager PlaybackManager)
        {
            #region Error checking
            if (PlaybackManager == null)
            {
                throw new ArgumentNullException(nameof(PlaybackManager));
            }
            #endregion

            this.PlaybackManager = PlaybackManager;
            this.PlaybackManager.PropertyChanged += PlaybackManager_PropertyChanged;

            if (PlaybackManager is IAudioPeakMeter)
            {
                this.PeakMeter = PlaybackManager as IAudioPeakMeter;
            }
        }
Example #2
0
        private void GetNextPeak()
        {
            IAudioPeakMeter Peak = this.Client.Playback.PeakLevel;

            this.LeftPeaks.Add(Peak.LeftPeak);
            this.RightPeaks.Add(Peak.RightPeak);

            if (this.LeftPeaks.Count == Resolution + 1)
            {
                this.LeftPeaks.RemoveAt(0);
            }

            if (this.RightPeaks.Count == Resolution + 1)
            {
                this.RightPeaks.RemoveAt(0);
            }
        }
Example #3
0
 internal AudioPeakMeter(IAudioPeakMeter audioPeakMeter)
 {
     _AudioPeakMeter = audioPeakMeter;
 }
Example #4
0
 internal AudioPeakMeter(IAudioPeakMeter audioPeakMeter)
 {
     _AudioPeakMeter = audioPeakMeter;
 }