mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-01 01:40:26 -05:00
raop: Better playback resume handling
When playback stops, a FLUSH command is send to the server and the sink goes to IDLE. If playback resumes quickly, sink goes back to RUNNING (without being SUSPENDED) and the sink should just start streaming again. This patch implements this behaviour.
This commit is contained in:
parent
604bf450dc
commit
31e2bc2fcf
3 changed files with 30 additions and 5 deletions
|
|
@ -332,10 +332,14 @@ static int udp_sink_process_msg(pa_msgobject *o, int code, void *data, int64_t o
|
|||
|
||||
pa_smoother_resume(u->smoother, pa_rtclock_now(), true);
|
||||
|
||||
if (!pa_raop_client_udp_can_stream(u->raop)) {
|
||||
/* Connecting will trigger a RECORD */
|
||||
if (!pa_raop_client_udp_is_alive(u->raop)) {
|
||||
/* Connecting will trigger a RECORD and start steaming */
|
||||
pa_raop_client_connect(u->raop);
|
||||
} else if (!pa_raop_client_udp_can_stream(u->raop)) {
|
||||
/* RECORD alredy sent, simply start streaming */
|
||||
pa_raop_client_udp_stream(u->raop);
|
||||
}
|
||||
|
||||
udp_start_wakeup_clock(u);
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue