Merge pull request #401 from chme/playback_resilience

Playback resilience
This commit is contained in:
ejurgensen 2017-07-09 19:54:03 +02:00 committed by GitHub
commit 8f906bc2c0
2 changed files with 8 additions and 3 deletions

View File

@ -3096,7 +3096,7 @@ raop_v2_control_cb(int fd, short what, void *arg)
seq_start = be16toh(seq_start); seq_start = be16toh(seq_start);
seq_len = be16toh(seq_len); seq_len = be16toh(seq_len);
DPRINTF(E_DBG, L_RAOP, "Got retransmit request, seq_start %u len %u\n", seq_start, seq_len); DPRINTF(E_DBG, L_RAOP, "Got retransmit request from '%s', seq_start %u len %u\n", rs->devname, seq_start, seq_len);
raop_v2_resend_range(rs, seq_start, seq_len); raop_v2_resend_range(rs, seq_start, seq_len);

View File

@ -1092,12 +1092,17 @@ playback_cb(int fd, short what, void *arg)
} }
DPRINTF(E_LOG, L_PLAYER, "Output delay detected (behind=%" PRIu64 ", max=%d), resetting all outputs\n", overrun, pb_write_deficit_max); DPRINTF(E_LOG, L_PLAYER, "Output delay detected (behind=%" PRIu64 ", max=%d), resetting all outputs\n", overrun, pb_write_deficit_max);
pb_write_recovery = 1; pb_write_recovery = true;
playback_suspend(); playback_suspend();
return; return;
} }
else else
pb_write_recovery = 0; {
if (overrun > 0)
DPRINTF(E_WARN, L_PLAYER, "Output delay detected: player is %" PRIu64 " ticks behind, catching up\n", overrun);
pb_write_recovery = false;
}
// If there was an overrun, we will try to read/write a corresponding number // If there was an overrun, we will try to read/write a corresponding number
// of times so we catch up. The read from the input is non-blocking, so it // of times so we catch up. The read from the input is non-blocking, so it