Resore ID of ShairportSync in Bonjour advertisiment and fix a noisy bug when a frame was missing

This commit is contained in:
Mike Brady
2017-03-10 21:19:30 +00:00
parent 1f3c6d700a
commit 158c94bbb6
2 changed files with 3 additions and 11 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ typedef struct {
// "sr=44100", "vn=3", "txtvers=1", config.password ? "pw=true" : "pw=false"
#define MDNS_RECORD_WITH_METADATA \
"sf=0x4", "fv=76400.10", "am=AirPort4,107", "vs=105.1", "tp=TCP,UDP", "vn=65537", \
"sf=0x4", "fv=76400.10", "am=ShairportSync", "vs=105.1", "tp=TCP,UDP", "vn=65537", \
METADATA_EXPRESSION, "ss=16", "sr=44100", "da=true", "sv=false", "et=0,1", "ek=1", "cn=0,1", \
"ch=2", "txtvers=1", config.password ? "pw=true" : "pw=false"
@@ -35,7 +35,7 @@ typedef struct {
// "txtvers=1", config.password ? "pw=true" : "pw=false"
#define MDNS_RECORD_WITHOUT_METADATA \
"sf=0x4", "fv=76400.10", "am=AirPort4,107", "vs=105.1", "tp=TCP,UDP", "vn=65537", "ss=16", \
"sf=0x4", "fv=76400.10", "am=ShairportSync", "vs=105.1", "tp=TCP,UDP", "vn=65537", "ss=16", \
"sr=44100", "da=true", "sv=false", "et=0,1", "ek=1", "cn=0,1", "ch=2", "txtvers=1", \
config.password ? "pw=true" : "pw=false"
+1 -9
View File
@@ -1181,7 +1181,6 @@ static abuf_t *buffer_get_frame(void) {
if (!curframe->ready) {
// debug(1, "Supplying a silent frame for frame %u", read);
missing_packets++;
memset(curframe->data, 0, input_bytes_per_frame * max_frames_per_packet);
curframe->timestamp = 0;
}
curframe->ready = 0;
@@ -1698,14 +1697,7 @@ static void *player_thread_func(void *arg) {
// debug(1,"Player has a supplied silent frame.");
last_seqno_read =
(SUCCESSOR(last_seqno_read) & 0xffff); // manage the packet out of sequence minder
if (inbuf == NULL)
debug(1, "NULL inbuf to play -- skipping it.");
else {
if (inbuflength == 0)
debug(1, "empty frame to play -- skipping it (1).");
else
config.output->play(inbuf, inbuflength);
}
config.output->play(silence, max_frames_per_packet * output_sample_ratio);
} else {
int enable_dither = 0;