Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Created October 20, 2021 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olokobayusuf/bd4b24d25f3c0adf95fe9c257d7e235d to your computer and use it in GitHub Desktop.
Save olokobayusuf/bd4b24d25f3c0adf95fe9c257d7e235d to your computer and use it in GitHub Desktop.
// We can perform an FFT on the microphone data...
var device = ... as AudioDevice;
// Using an audio spectrum output...
var spectrumOutput = new AudioSpectrumOutput();
// But we can also do more with the audio data...
device.StartRunning(audioBuffer => {
// Update the spectrum output
spectrumOutput.Update(audioBuffer);
// But do other stuff with the audio buffer
DoOtherStuff(audioBuffer);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment