]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Only set volume if it has been asked for externally. Clean up mute. Add ability do...
authorMike Brady <mikebrady@eircom.net>
Sun, 30 Apr 2017 14:29:02 +0000 (15:29 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 30 Apr 2017 14:29:02 +0000 (15:29 +0100)
player.c
rtsp.c

index 459b2cc81554bbcf4e696d8c3caf827c267c4459..064594b56cb2701aad7fb3052f25327d4e9ba6d8 100644 (file)
--- a/player.c
+++ b/player.c
@@ -820,7 +820,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info* conn) {
               // if would be in sync. To do this, we would give it a latency offset of -100 ms, i.e.
               // -4410 frames.
 
-              debug(1, "Output sample ratio is %d", conn->output_sample_ratio);
+              // debug(1, "Output sample ratio is %d", conn->output_sample_ratio);
 
               int64_t delta = (conn->first_packet_timestamp - reference_timestamp) +
                               config.latency * conn->output_sample_ratio +
@@ -1319,7 +1319,7 @@ static void *player_thread_func(void *arg) {
 
   conn->output_sample_ratio = config.output_rate / conn->input_rate;
 
-  debug(1, "Output sample ratio is %d.", conn->output_sample_ratio);
+  //  debug(1, "Output sample ratio is %d.", conn->output_sample_ratio);
 
   conn->max_frame_size_change = 500 * conn->output_sample_ratio; // we add or subtract one frame at the nominal
                                                    // rate, multiply it by the frame ratio.
diff --git a/rtsp.c b/rtsp.c
index 5cb6532808e19ae8d19da3ff957b82d85dfcb6af..6b74b5664b5300938ad71360a998ea141e42258f 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -854,7 +854,7 @@ static void handle_set_parameter_parameter(rtsp_conn_info *conn, rtsp_message *r
 
     if (!strncmp(cp, "volume: ", 8)) {
       float volume = atof(cp + 8);
-      debug(3, "volume: %f\n", volume);
+      debug(1, "AirPlay request to set volume to: %f\n", volume);
       player_volume(volume,conn);
     } else
 #ifdef CONFIG_METADATA
@@ -1351,7 +1351,7 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
       if (playing_conn) {
         debug(1,"Playing connection asked to stop");
         if (playing_conn==conn) {
-          debug(1,"ANNOuNCE asking to stop itself.");
+          debug(1,"ANNOUNCE asking to stop itself.");
         } else {
           playing_conn->stop = 1;
           memory_barrier();