Exemplo n.º 1
0
 /// <summary>
 /// Dispose
 /// </summary>
 public void Dispose()
 {
     if (audioSessionEventCallback != null)
     {
         Marshal.ThrowExceptionForHR(audioSessionControlInterface.UnregisterAudioSessionNotification(audioSessionEventCallback));
     }
     GC.SuppressFinalize(this);
 }
 public void Dispose()
 {
     if (_AudioSessionEvents != null)
     {
         Marshal.ThrowExceptionForHR(_AudioSessionControl.UnregisterAudioSessionNotification(_AudioSessionEvents));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Unregisters an event client from receiving callbacks
 /// </summary>
 /// <param name="eventClient"></param>
 public void UnRegisterEventClient(IAudioSessionEventsHandler eventClient)
 {
     // if one is registered, let it go
     if (audioSessionEventCallback != null)
     {
         Marshal.ThrowExceptionForHR(audioSessionControlInterface.UnregisterAudioSessionNotification(audioSessionEventCallback));
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Unregisters the event client from receiving callbacks
        /// </summary>
        private void UnregisterEventClient()
        {
            if (_sessionEvents == null)
            {
                return;
            }

            Marshal.ThrowExceptionForHR(_audioSessionControl.UnregisterAudioSessionNotification(_sessionEvents));
            _sessionEvents = null;
        }