Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Last active August 12, 2019 19:08
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/cbb49594ec6251e5ba723f1bff6f5bf5 to your computer and use it in GitHub Desktop.
Save olokobayusuf/cbb49594ec6251e5ba723f1bff6f5bf5 to your computer and use it in GitHub Desktop.
// Get a hardware microphone
var microphoneDevice = AudioDevice.GetDevices()[0];
// Create a virtual device from an AudioSource component in game
var gameDevice = new VirtualDevice(audioSource);
// Create a mixer device that mixes audio from both devices
var audioDevice = new MixerDevice(microphoneDevice, gameDevice);
// Use the audio device like any other NatMic device
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment