mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 12:07:09 +03:00
better mad sync
This commit is contained in:
@@ -243,6 +243,8 @@ static decode_state mad_decode(void) {
|
|||||||
MAD(m, synth_frame, &m->synth, &m->frame);
|
MAD(m, synth_frame, &m->synth, &m->frame);
|
||||||
|
|
||||||
if (decode.new_stream) {
|
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;
|
LOCK_O;
|
||||||
LOG_INFO("setting track_start");
|
LOG_INFO("setting track_start");
|
||||||
output.next_sample_rate = decode_newstream(m->synth.pcm.samplerate, output.supported_rates);
|
output.next_sample_rate = decode_newstream(m->synth.pcm.samplerate, output.supported_rates);
|
||||||
|
|||||||
Reference in New Issue
Block a user