コード例 #1
0
 protected virtual async void OnDefaultDeviceChanged(object sender, NotificationClientEventArgs e)
 {
     if (!this.RestartRequired(e.Flow, e.Role))
     {
         return;
     }
     Logger.Write(this, LogLevel.Debug, "The default playback device was changed: {0} => {1} => {2}", e.Flow.Value, e.Role.Value, e.Device);
     Logger.Write(this, LogLevel.Debug, "Restarting the output.");
     using (e.Defer())
     {
         await this.Restart().ConfigureAwait(false);
     }
 }
コード例 #2
0
 protected virtual void OnDefaultDeviceChanged(object sender, NotificationClientEventArgs e)
 {
     this.Debouncer.Exec(() =>
     {
         if (!this.RestartRequired(e.Flow, e.Role))
         {
             return;
         }
         Logger.Write(this, LogLevel.Debug, "The default playback device was changed: {0} => {1} => {2}", e.Flow.Value, e.Role.Value, e.Device);
         Logger.Write(this, LogLevel.Debug, "Restarting the output.");
         var task = this.Restart();
     });
 }
コード例 #3
0
 protected virtual void OnDeviceRemoved(object sender, NotificationClientEventArgs e)
 {
     //Nothing to do.
 }
コード例 #4
0
 protected virtual void OnPropertyValueChanged(object sender, NotificationClientEventArgs e)
 {
     //Nothing to do.
 }