private SoundFormat OnAudioSetup(SoundFormat arg) { m_audioFormat = arg; var streamInfo = StreamInfo.FromSoundFormat(arg); streamInfo.ID = AUDIO_ID; m_inputMedia.AddOrUpdateStream(streamInfo, AUDIO_BUFFERS); // This sample supports only stereo or 5.1 audio, to use other audio channel layouts change TinyAudioProcessor arg.UseCustomAudioRendering = (arg.Channels == 2 || arg.Channels == 6); return arg; }