Only set volume if it has been asked for externally. Clean up mute. Add ability do disable hardware mute

This commit is contained in:
Mike Brady
2017-04-30 15:29:02 +01:00
parent eefbde39eb
commit 74bbb9a3f2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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();