public ControlPanelViewModel(IWaveFormRenderer waveFormRenderer, ISpectrumAnalyser analyzer) { Title = "AudioDemo"; this.waveFormRenderer = waveFormRenderer; this.analyzer = analyzer; audioGraph = new AudioGraph(); audioGraph.CaptureComplete += audioGraph_CaptureComplete; audioGraph.MaximumCalculated += audioGraph_MaximumCalculated; audioGraph.FftCalculated += audioGraph_FftCalculated; captureSeconds = 10; NotificationsPerSecond = 100; PlayFileCommand = new RelayCommand( () => PlayFile(), () => true); CaptureCommand = new RelayCommand( () => Capture(), () => true); PlayCapturedAudioCommand = new RelayCommand( () => PlayCapturedAudio(), () => HasCapturedAudio()); SaveCapturedAudioCommand = new RelayCommand( () => SaveCapturedAudio(), () => HasCapturedAudio()); StopCommand = new RelayCommand( () => Stop(), () => true); }
public ControlPanelViewModel(IWaveFormRenderer waveFormRenderer) { this.waveFormRenderer = waveFormRenderer; this.audioGraph = new AudioGraph(); audioGraph.MaximumCalculated += new EventHandler<MaxSampleEventArgs>(audioGraph_MaximumCalculated); audioGraph.GotSongList += new EventHandler<TVA.EventArgs<List<string>>>(audioGraph_GotSongList); audioGraph.PlaybackStateChanged += new EventHandler<TVA.EventArgs<PlaybackState, string>>(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); }
public ControlPanelViewModel(IWaveFormRenderer waveFormRenderer, SpectrumAnalyser analyzer) { this.waveFormRenderer = waveFormRenderer; this.analyzer = analyzer; this.audioGraph = new AudioGraph(); audioGraph.CaptureComplete += new EventHandler(audioGraph_CaptureComplete); audioGraph.MaximumCalculated += new EventHandler <MaxSampleEventArgs>(audioGraph_MaximumCalculated); audioGraph.FftCalculated += new EventHandler <FftEventArgs>(audioGraph_FftCalculated); this.captureSeconds = 10; this.NotificationsPerSecond = 100; PlayFileCommand = new RelayCommand( () => this.PlayFile(), () => 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); }
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); }
public ControlPanelViewModel(IWaveFormRenderer waveFormRenderer, SpectrumAnalyser analyzer) { this.waveFormRenderer = waveFormRenderer; this.analyzer = analyzer; this.audioGraph = new AudioGraph(); audioGraph.CaptureComplete += new EventHandler(audioGraph_CaptureComplete); audioGraph.MaximumCalculated += new EventHandler<MaxSampleEventArgs>(audioGraph_MaximumCalculated); audioGraph.FftCalculated += new EventHandler<FftEventArgs>(audioGraph_FftCalculated); this.captureSeconds = 10; this.NotificationsPerSecond = 100; PlayFileCommand = new RelayCommand( () => this.PlayFile(), () => 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); }
/// <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 = ". . ."; }