From ac851fd0eab94a2d0ad51b25f90d71230b3af784 Mon Sep 17 00:00:00 2001 From: HiFiPHile Date: Wed, 26 Aug 2026 16:07:50 +0200 Subject: audio: preserve feedback scheduler remainder Keep the fractional packet accumulator when a new explicit-feedback value is latched. Repeated feedback updates no longer bias high-speed fractional rates toward alternating undersized and oversized packets. Signed-off-by: HiFiPHile --- src/class/audio/audio_host.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/class') diff --git a/src/class/audio/audio_host.c b/src/class/audio/audio_host.c index e676a3354..157f15545 100644 --- a/src/class/audio/audio_host.c +++ b/src/class/audio/audio_host.c @@ -551,7 +551,8 @@ static void audioh_stream_playback_xfer(tuh_audio_stream_t *s) { if (loop_done && playback->feedback_pending) { playback->target_frames_q16 = playback->pending_frames_q16; playback->feedback_pending = false; - playback->rem_acc = 0; + // Keep the remainder from the completed cycle. Clearing it for every + // feedback update biases the average toward the integer packet sizes. } } -- cgit v1.3.1