P5-R3: fix count-in recursion + test buffer loop size
Lint & Validate / lint (push) Has been cancelled
Lint & Validate / lint (push) Has been cancelled
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user