private const int DEVICE_CHANNELS = 1;
...
public readonly static AudioSamplingRatesEnum DefaultAudioSourceSamplingRate = AudioSamplingRatesEnum.Rate8KHz;
public readonly static AudioSamplingRatesEnum DefaultAudioPlaybackRate = AudioSamplingRatesEnum.Rate8KHz;
Is it done on purpose? Why do we stick to minimal values if we can determine the devices capabilities?
NAudio.CoreAudioApi.MMDeviceEnumerator enumerator = new NAudio.CoreAudioApi.MMDeviceEnumerator();
NAudio.CoreAudioApi.MMDevice captureDevice = enumerator.GetDefaultAudioEndpoint(
NAudio.CoreAudioApi.DataFlow.Capture, NAudio.CoreAudioApi.Role.Communications);
var captureChannels = captureDevice.AudioClient.MixFormat.Channels;
var captureSampleRate = captureDevice.AudioClient.MixFormat.SampleRate;
NAudio.CoreAudioApi.MMDevice renderDevice = enumerator.GetDefaultAudioEndpoint(
NAudio.CoreAudioApi.DataFlow.Render, NAudio.CoreAudioApi.Role.Communications);
var renderChannels = renderDevice.AudioClient.MixFormat.Channels;
var renderSampleRate = renderDevice.AudioClient.MixFormat.SampleRate;