Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Last active February 15, 2020 22:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save olokobayusuf/4708c4ea8fe4b62aa499f0914baab3d0 to your computer and use it in GitHub Desktop.
Streaming audio sample buffers from an audio device in NatDevice.
void StartRecording () {
// Start recording audio from the microphone
IAudioDevice device = ...;
device.StartRunning(OnSampleBuffer);
}
void OnSampleBuffer (float[] sampleBuffer, long timestamp) {
// `sampleBuffer` is linear PCM, interleaved by channel
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment