Repository navigation
Commit 32bd0ed
committed
fix(player): stop the pitch worklet running twelve idle chains at zero transpose
Both engines wired all thirteen semitone buses into the SoundTouch worklet
at construction. The processor decides whether a semitone is in use by
whether its input has channels, and takes its bypass path only when none
do. A bus wired with nothing playing into it still reaches the processor
as one channel of silence in Chrome, so every pitch input read as live,
twelve WSOLA chains were built and ran on silence for the whole track,
and the bypass never engaged even with nothing transposed.
Measured in headless Chromium, offline render of 60 s, seven stems, no
transpose: 13% of real time with every bus wired, 0.6% with only the
unpitched bus wired, 0.5% with no worklet at all. On a laptop that load
lands on the audio thread's 128-sample deadline and is heard as pops.
It also meant the playhead ran ahead of the audio by the worklet's
priming latency, since the engine assumes none when no lane is transposed.
A pitch bus is now wired into the worklet only while a lane is on it and
unwired once the last lane leaves, so the processor sees the empty input
its contract describes. The unpitched bus stays wired: the click is
scheduled onto it directly. The routing test now walks the graph for
which inputs are wired as lanes arrive, share a key, and leave.1 parent 37a2c5f commit 32bd0ed
3 files changed
Lines changed: 102 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
314 | 326 | | |
315 | 327 | | |
316 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
317 | 347 | | |
318 | 348 | | |
319 | 349 | | |
320 | 350 | | |
321 | 351 | | |
322 | 352 | | |
323 | 353 | | |
| 354 | + | |
| 355 | + | |
324 | 356 | | |
325 | 357 | | |
326 | 358 | | |
| 359 | + | |
327 | 360 | | |
328 | 361 | | |
329 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
201 | 215 | | |
202 | 216 | | |
203 | 217 | | |
| |||
218 | 232 | | |
219 | 233 | | |
220 | 234 | | |
221 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
222 | 241 | | |
223 | 242 | | |
224 | 243 | | |
| |||
320 | 339 | | |
321 | 340 | | |
322 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
323 | 364 | | |
324 | 365 | | |
325 | 366 | | |
326 | 367 | | |
327 | 368 | | |
328 | 369 | | |
| 370 | + | |
| 371 | + | |
329 | 372 | | |
330 | 373 | | |
331 | 374 | | |
| 375 | + | |
332 | 376 | | |
333 | 377 | | |
334 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
246 | 257 | | |
247 | 258 | | |
248 | 259 | | |
| |||
266 | 277 | | |
267 | 278 | | |
268 | 279 | | |
| 280 | + | |
269 | 281 | | |
270 | 282 | | |
271 | 283 | | |
| |||
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
| 289 | + | |
277 | 290 | | |
278 | 291 | | |
279 | 292 | | |
| |||
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
294 | 317 | | |
295 | 318 | | |
296 | 319 | | |
| |||
0 commit comments