예제 #1
0
파일: AudioGraph.cs 프로젝트: avs009/gsf
 public AudioGraph()
 {
     playback = new AudioPlayback();
     playback.OnSample += OnSample;
     aggregator = new SampleAggregator();
     aggregator.NotificationCount = 100;
 }
예제 #2
0
 public AudioGraph()
 {
     playback = new AudioPlayback();
     playback.OnSample += OnSample;
     capture = new AudioCapture();
     capture.OnSample += OnSample;
     aggregator = new SampleAggregator(8);
     aggregator.NotificationCount = 100;
     aggregator.PerformFFT = true;
 }
예제 #3
0
 public AudioGraph()
 {
     playback                     = new AudioPlayback();
     playback.OnSample           += OnSample;
     capture                      = new AudioCapture();
     capture.OnSample            += OnSample;
     aggregator                   = new SampleAggregator();
     aggregator.NotificationCount = 100;
     aggregator.PerformFFT        = true;
 }
예제 #4
0
 public void Dispose()
 {
     if (capture != null)
     {
         capture.Dispose();
         capture = null;
     }
     if (playback != null)
     {
         playback.Dispose();
         playback = null;
     }
 }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }
예제 #9
0
 public void Dispose()
 {
     if (capture != null)
     {
         capture.Dispose();
         capture = null;
     }
     if (playback != null)
     {
         playback.Dispose();
         playback = null;
     }
 }
예제 #10
0
파일: AudioGraph.cs 프로젝트: avs009/gsf
 public void Dispose()
 {
     if (playback != null)
     {
         playback.Dispose();
         playback = null;
     }
 }