]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Merge other enhancements.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 9 Aug 2022 13:18:53 +0000 (14:18 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 9 Aug 2022 13:18:53 +0000 (14:18 +0100)
1  2 
common.c
dbus-service.c
player.c
rtsp.c
shairport.c

diff --cc common.c
Simple merge
diff --cc dbus-service.c
index e72e5a9c398b56a574463b8db89b74734944b74b,05dd97266f0c06dc423fb01cb20855cc590630bc..c68aac9b1222841671805f672dd446f81b0ecc37
@@@ -571,25 -571,6 +571,25 @@@ gboolean notify_drift_tolerance_callbac
    return TRUE;
  }
  
-     debug(1, ">> setting volume to %6.3f.", iv);
 +gboolean notify_volume_callback(ShairportSync *skeleton,
 +                                         __attribute__((unused)) gpointer user_data) {
 +  gdouble iv = shairport_sync_get_volume(skeleton);
 +  if (((iv >= -30.0) && (iv <= 0.0)) || (iv == -144.0)) {
++    debug(2, ">> setting volume to %7.4f.", iv);
 +    
 +    lock_player();
 +    config.airplay_volume = iv;
 +    if (playing_conn != NULL)
 +      player_volume(iv, playing_conn);
 +    unlock_player();
 +    
 +  } else {
 +    debug(1, ">> invalid volume: %f. Ignored.", iv);
 +    shairport_sync_set_volume(skeleton, config.airplay_volume);
 +  }
 +  return TRUE;
 +}
 +
  gboolean notify_disable_standby_mode_callback(ShairportSync *skeleton,
                                                __attribute__((unused)) gpointer user_data) {
    char *th = (char *)shairport_sync_get_disable_standby_mode(skeleton);
diff --cc player.c
Simple merge
diff --cc rtsp.c
Simple merge
diff --cc shairport.c
Simple merge