/// <summary>
 /// Registers an even client for callbacks
 /// </summary>
 /// <param name="eventClient"></param>
 public void RegisterEventClient(IAudioSessionEventsHandler eventClient)
 {
     // we could have an array or list of listeners if we like
     audioSessionEventCallback = new AudioSessionEventsCallback(eventClient);
     Marshal.ThrowExceptionForHR(
         audioSessionControlInterface.RegisterAudioSessionNotification(audioSessionEventCallback));
 }
예제 #2
0
 public void UnRegisterEventClient(IAudioSessionEventsHandler eventClient)
 {
     if (this.audioSessionEventCallback != null)
     {
         Marshal.ThrowExceptionForHR(this.audioSessionControlInterface.UnregisterAudioSessionNotification(this.audioSessionEventCallback));
     }
 }
예제 #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));
     }
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="handler"></param>
 public AudioSessionEventsCallback(IAudioSessionEventsHandler handler)
 {
     audioSessionEventsHandler = handler;
 }
예제 #5
0
 public void RegisterEventClient(IAudioSessionEventsHandler eventClient)
 {
     this.audioSessionEventCallback = new AudioSessionEventsCallback(eventClient);
     Marshal.ThrowExceptionForHR(this.audioSessionControlInterface.RegisterAudioSessionNotification(this.audioSessionEventCallback));
 }
예제 #6
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));
     }
 }
예제 #7
0
 /// <summary>
 /// Registers an even client for callbacks
 /// </summary>
 /// <param name="eventClient"></param>
 public void RegisterEventClient(IAudioSessionEventsHandler eventClient)
 {
     // we could have an array or list of listeners if we like
     audioSessionEventCallback = new AudioSessionEventsCallback(eventClient);
     Marshal.ThrowExceptionForHR(audioSessionControlInterface.RegisterAudioSessionNotification(audioSessionEventCallback));
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="handler"></param>
 public AudioSessionEventsCallback(IAudioSessionEventsHandler handler)
 {
     audioSessionEventsHandler = handler;
 }
예제 #9
0
 internal AudioSessionEventsCallback(IAudioSessionEventsHandler handler)
 {
     audioSessionEventsHandler = handler;
 }
예제 #10
0
 internal AudioSessionEventsCallback(IAudioSessionEventsHandler handler)
 {
     audioSessionEventsHandler = handler;
 }