Version 3.2.2: in-memory replacements fill their slots exactly (padded ones played as silence)

This commit is contained in:
2026-10-11 00:10:44 +02:00
parent cac52e7597
commit b6b96307ca
16 changed files with 223 additions and 52 deletions

View File

@@ -200,10 +200,10 @@ def bank_probes(ws, sounds):
secs = min(10.0, max(0.4, s.seconds or 1.0))
while secs >= 0.1:
wem, _ = encode(x[:int(secs * sr)], sr, PROBE_RATE, 1, PROBE_Q)
if len(wem) <= lim:
if ws.fits(s, wem): # within the slot, and able to fill it exactly (wem.fill)
out.append((s, wem))
break
secs *= 0.7
secs *= 0.7 if len(wem) > lim else 0.98
return out