From 0738ddeac8871b9eafbe55e1bb763f6a77bfb9d6 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Wed, 18 Apr 2018 20:29:16 +0100 Subject: [PATCH 1/3] Make resend requests come from tyhe control socket rather than the audio socket. This makes it work with AirAudio and according to the unofficial standard. --- rtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtp.c b/rtp.c index b0099910..e0718148 100644 --- a/rtp.c +++ b/rtp.c @@ -960,7 +960,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) { char req[8]; // *not* a standard RTCP NACK req[0] = 0x80; req[1] = (char)0x55 | (char)0x80; // Apple 'resend' - *(unsigned short *)(req + 2) = htons(1); // our seqnum + *(unsigned short *)(req + 2) = htons(1); // our sequence number *(unsigned short *)(req + 4) = htons(first); // missed seqnum *(unsigned short *)(req + 6) = htons(count); // count socklen_t msgsize = sizeof(struct sockaddr_in); @@ -976,7 +976,7 @@ void rtp_request_resend(seq_t first, uint32_t count, rtsp_conn_info *conn) { resend_error_backoff_time)) { if ((config.diagnostic_drop_packet_fraction == 0.0) || (drand48() > config.diagnostic_drop_packet_fraction)) { - if (sendto(conn->audio_socket, req, sizeof(req), 0, + if (sendto(conn->control_socket, req, sizeof(req), 0, (struct sockaddr *)&conn->rtp_client_control_socket, msgsize) == -1) { char em[1024]; strerror_r(errno, em, sizeof(em)); From a7fdb4604218426fad8909e2c4504710a2feaf3b Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Wed, 18 Apr 2018 20:29:49 +0100 Subject: [PATCH 2/3] Make resend requests come from tyhe control socket rather than the audio socket. This makes it work with AirAudio and according to the unofficial standard. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d5fc6295..d396d7ed 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [3.2d40], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [3.2d41], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) From 18c3b3afe8456620da273a3fa05bc39e1931287b Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Wed, 18 Apr 2018 20:37:55 +0100 Subject: [PATCH 3/3] Update RELEASENOTES.md --- RELEASENOTES.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5a2e63eb..d3d41818 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,4 +1,9 @@ -Version 3.2d50 +Version 3.2d41 +==== +**Bug Fixes** +* Fixed a "silent" bug that prevented Shairport Sync working properly with AirAudio. According to the unofficial standard, requests for resending missing packets should come from the control port. However, up until now, Shairport Sync sent them on the audio port. All AirPlay sources responded correctly to this incorrect request, except AirAudio, which rightly, discarded requests that were not coming from the correct source. Fixed now, with many thanks to [funtax](https://github.com/funtax) and to [Janusz Kowalczyk](https://github.com/kowalcj0) for bringing the issue to the fore. + +Version 3.2d40 ==== **Bug Fixes** * A number of serious and long-standing bugs have been identified and fixed in the threads that handle audio, control and timing packets. Specifically, if UDP reception or transmission errors occured (a rare occurence on a good network, but possible on noisy or congested networks), the threads would quit. An error on the reception of the first control packet could mute an entire play session.