Exemplo n.º 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);
     }
 }
Exemplo n.º 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();
     });
 }
Exemplo n.º 3
0
 protected virtual void OnDeviceRemoved(object sender, NotificationClientEventArgs e)
 {
     //Nothing to do.
 }
Exemplo n.º 4
0
 protected virtual void OnPropertyValueChanged(object sender, NotificationClientEventArgs e)
 {
     //Nothing to do.
 }