I am using NAudio wrapper and I am trying mute the session when it's created.
MMDevice _device = _deviceEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia);
_device.AudioSessionManager.OnSessionCreated += AudioSessionManager_OnSessionCreated;
private void AudioSessionManager_OnSessionCreated(object sender, IAudioSessionControl newSession)
{
//mute session
}
in order to mute the session, I need to convert it from IAudioSessionControl
to AudioSessionControl
IAudioSessionControl
is an interface and therefore I have no idea how to conver it.
A little help would be appreciated.