Beispiel #1
0
        private void InitializeInstance()
        {
            _audioInput = new CSCoreAudioInput();
            _audioInput.Initialize();

            _audioBuffer = new AudioBuffer(4096); // Working with ~93ms -
            _audioInput.DataAvailable += (left, right) => _audioBuffer.Put(left, right);

            _processors.Add(new FourierSpectrumProvider(_audioBuffer));

            foreach (IAudioProcessor processor in _processors)
            {
                processor.Initialize();
            }
        }
 //BLARG 01.14.2020: Added a method to change the Audio device without 1. Restarting the application 2. Crashing the Application 3. The Visualization Stopping
 public void ChangeAudioDevice(MMDevice newDevice)
 {
     _audioInput.Dispose();
     _audioInput.Initialize(newDevice);
 }