You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a MixerProvider capable of mixing loopback and microphone input, with the microphone recording being optional. However, I'm experiencing an intermittent issue when disposing of WasapiLoopbackCapture.
Into my dispose method, I'm getting the bellow exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
at NAudio.CoreAudioApi.AudioClient.Dispose()
at NAudio.CoreAudioApi.WasapiCapture.Dispose()
at EswLinphoneClient.Media.AudioMixerProvider.Dispose
Dispose method:
if (!disposedValue)
{
if (disposing)
{
_mixerProvider.RemoveAllMixerInputs();
foreach (var source in _mixers.ToArray())
{
source.Buffer.ClearBuffer();
source.Input.Dispose(); //THIS DISPOSE IS CAUSING THE ERROR
}
_mixers.Clear();
_silentPlayer?.Dispose();
_timerLoopbackChecker?.Dispose();
_timer?.Dispose();
_device?.Dispose();
}
disposedValue = true;
}
Do you have any idea that what could be causing such issue?
The text was updated successfully, but these errors were encountered:
I have a MixerProvider capable of mixing loopback and microphone input, with the microphone recording being optional. However, I'm experiencing an intermittent issue when disposing of WasapiLoopbackCapture.
Into my dispose method, I'm getting the bellow exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
at NAudio.CoreAudioApi.AudioClient.Dispose()
at NAudio.CoreAudioApi.WasapiCapture.Dispose()
at EswLinphoneClient.Media.AudioMixerProvider.Dispose
Dispose method:
Do you have any idea that what could be causing such issue?
The text was updated successfully, but these errors were encountered: