From: Mike Brady Date: Sun, 30 Apr 2017 14:29:02 +0000 (+0100) Subject: Only set volume if it has been asked for externally. Clean up mute. Add ability do... X-Git-Tag: 3.1d16~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74bbb9a3f210f60c0d2bec1dcc232be84b45b3c4;p=thirdparty%2Fshairport-sync.git Only set volume if it has been asked for externally. Clean up mute. Add ability do disable hardware mute --- diff --git a/player.c b/player.c index 459b2cc8..064594b5 100644 --- 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 5cb65328..6b74b566 100644 --- 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();