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