diff options
| author | HiFiPHile <[email protected]> | 2026-08-26 16:07:50 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-08-27 10:34:33 +0200 |
| commit | ac851fd0eab94a2d0ad51b25f90d71230b3af784 (patch) | |
| tree | 43e8269fdcdc57191f1e7a241f97f785c40c8b81 /src/class | |
| parent | cca648556dd0c096aa7210ee5a2b962efae36440 (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/audio/audio_host.c | 3 |
1 files changed, 2 insertions, 1 deletions
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. } } |
