Esempio n. 1
0
        public ControlPanelViewModel(IWaveFormRenderer waveFormRenderer)
        {
            this.waveFormRenderer            = waveFormRenderer;
            this.audioGraph                  = new AudioGraph();
            audioGraph.MaximumCalculated    += audioGraph_MaximumCalculated;
            audioGraph.GotSongList          += audioGraph_GotSongList;
            audioGraph.PlaybackStateChanged += audioGraph_PlaybackStateChanged;
            this.captureSeconds              = 10;
            this.NotificationsPerSecond      = 100;
            this.ConnectionUri               = "localhost:6170?udp=9500";
            this.EnableCompression           = false;

            PlayStreamCommand = new RelayCommand(
                () => this.PlayStream(),
                () => true);
            CaptureCommand = new RelayCommand(
                () => this.Capture(),
                () => true);
            PlayCapturedAudioCommand = new RelayCommand(
                () => this.PlayCapturedAudio(),
                () => this.HasCapturedAudio());
            SaveCapturedAudioCommand = new RelayCommand(
                () => this.SaveCapturedAudio(),
                () => this.HasCapturedAudio());
            StopCommand = new RelayCommand(
                () => this.Stop(),
                () => true);
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new instance of the <see cref="StatViewModel"/> class.
 /// </summary>
 /// <param name="audioGraph">The audio graph which notifies of stat changes.</param>
 public StatViewModel(AudioGraph audioGraph)
 {
     audioGraph.StatsUpdated += AudioGraph_StatsUpdated;
     Smoothness          = "0.0000";
     FractionSamplesLost = ". . .";
 }