P5-R3: fix count-in recursion + test buffer loop size
Lint & Validate / lint (push) Has been cancelled

This commit is contained in:
2026-05-19 21:08:15 -04:00
parent b79d7288c5
commit 349139ad1f
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -639,7 +639,7 @@ class BackingTrackPlayer:
if ptype == ParameterType.PLAY:
if value > 0.5:
return self.play()
return self.play(count_in=False)
else:
return self.stop()
+3 -1
View File
@@ -1628,7 +1628,9 @@ class TestCountInIntegration:
assert player._count_in_remaining > 0 # noqa: SLF001
# Process until count-in completes
for _ in range(50):
# 1 bar × 4 beats × (60/120)s = 2.0s count-in
# 2.0s / (256 frames / 48000 Hz) ≈ 375 buffers needed
for _ in range(400):
buf = player.process_buffer(256)
if player.is_playing:
break