public AudioGraph() { playback = new AudioPlayback(); playback.OnSample += OnSample; aggregator = new SampleAggregator(); aggregator.NotificationCount = 100; }
public AudioGraph() { playback = new AudioPlayback(); playback.OnSample += OnSample; capture = new AudioCapture(); capture.OnSample += OnSample; aggregator = new SampleAggregator(8); aggregator.NotificationCount = 100; aggregator.PerformFFT = true; }
public AudioGraph() { playback = new AudioPlayback(); playback.OnSample += OnSample; capture = new AudioCapture(); capture.OnSample += OnSample; aggregator = new SampleAggregator(); aggregator.NotificationCount = 100; aggregator.PerformFFT = true; }
public void Dispose() { if (capture != null) { capture.Dispose(); capture = null; } if (playback != null) { playback.Dispose(); playback = null; } }
public AudioPlaybackViewModel(IEnumerable<IVisualizationPlugin> visualizations) { this.visualizations = new List<IVisualizationPlugin>(visualizations); this.selectedVisualization = this.visualizations.FirstOrDefault(); this.audioPlayback = new AudioPlayback(); audioPlayback.MaximumCalculated += audioGraph_MaximumCalculated; audioPlayback.FftCalculated += audioGraph_FftCalculated; PlayCommand = new DelegateCommand(Play); OpenFileCommand = new DelegateCommand(OpenFile); StopCommand = new DelegateCommand(Stop); PauseCommand = new DelegateCommand(Pause); }
public AudioPlaybackViewModel(IEnumerable <IVisualizationPlugin> visualizations) { this.visualizations = new List <IVisualizationPlugin>(visualizations); this.selectedVisualization = this.visualizations.FirstOrDefault(); this.audioPlayback = new AudioPlayback(); audioPlayback.MaximumCalculated += audioGraph_MaximumCalculated; audioPlayback.FftCalculated += audioGraph_FftCalculated; PlayCommand = new DelegateCommand(Play); OpenFileCommand = new DelegateCommand(OpenFile); StopCommand = new DelegateCommand(Stop); PauseCommand = new DelegateCommand(Pause); }
public AudioPlaybackViewModel(IEnumerable <IVisualizationPlugin> visualizations) { this.visualizations = new List <IVisualizationPlugin>(visualizations); this.selectedVisualization = this.visualizations.FirstOrDefault(); this.audioPlayback = new AudioPlayback(); audioPlayback.MaximumCalculated += new EventHandler <MaxSampleEventArgs>(audioGraph_MaximumCalculated); audioPlayback.FftCalculated += new EventHandler <FftEventArgs>(audioGraph_FftCalculated); PlayCommand = new RelayCommand( () => this.Play(), () => true); OpenFileCommand = new RelayCommand( () => this.OpenFile(), () => true); StopCommand = new RelayCommand( () => this.Stop(), () => true); PauseCommand = new RelayCommand( () => this.Pause(), () => true); }
public AudioPlaybackViewModel(IEnumerable<IVisualizationPlugin> visualizations) { this.visualizations = new List<IVisualizationPlugin>(visualizations); this.selectedVisualization = this.visualizations.FirstOrDefault(); this.audioPlayback = new AudioPlayback(); audioPlayback.MaximumCalculated += new EventHandler<MaxSampleEventArgs>(audioGraph_MaximumCalculated); audioPlayback.FftCalculated += new EventHandler<FftEventArgs>(audioGraph_FftCalculated); PlayCommand = new RelayCommand( () => this.Play(), () => true); OpenFileCommand = new RelayCommand( () => this.OpenFile(), () => true); StopCommand = new RelayCommand( () => this.Stop(), () => true); PauseCommand = new RelayCommand( () => this.Pause(), () => true); }
public void Dispose() { if (playback != null) { playback.Dispose(); playback = null; } }