MCPcopy Create free account
hub / github.com/stemdeckapp/stemdeck / setPlaybackRate

Function setPlaybackRate

static/js/chunkedAudioEngine.js:419–429  ·  view source on GitHub ↗
(rate)

Source from the content-addressed store, hash-verified

417 master.gain.setTargetAtTime(Math.max(0, v), ctx.currentTime, 0.01);
418 },
419 setPlaybackRate(rate) {
420 const t = _getCurrentTime(); // capture before updating rate
421 _playbackRate = rate;
422 if (stNode) {
423 stNode.parameters.get('tempo').value = rate;
424 } else if (playing) {
425 // Tape-effect fallback: seek to current position so new source nodes
426 // are created with the updated playbackRate and scheduling math resets.
427 seek(t);
428 }
429 },
430 getAnalyser: () => null,
431 getBuffers: () => new Map(),
432 destroy() {

Callers

nothing calls this directly

Calls 2

_getCurrentTimeFunction · 0.85
seekFunction · 0.70

Tested by

no test coverage detected