From 7f671909bbcc37c53101e444de65b43f2c063cd0 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Thu, 27 Aug 2020 16:40:11 -0700 Subject: [PATCH] better mad sync --- components/squeezelite/mad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/squeezelite/mad.c b/components/squeezelite/mad.c index ccc6d50b..a34b5e2b 100644 --- a/components/squeezelite/mad.c +++ b/components/squeezelite/mad.c @@ -243,6 +243,8 @@ static decode_state mad_decode(void) { MAD(m, synth_frame, &m->synth, &m->frame); if (decode.new_stream) { + // seems that mad can use some help in term of sync detection + if (m->stream.next_frame[0] != 0xff || (m->stream.next_frame[1] & 0xf0) != 0xf0) continue; LOCK_O; LOG_INFO("setting track_start"); output.next_sample_rate = decode_newstream(m->synth.pcm.samplerate, output.supported_rates);