mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
add superdough warning when scheduling in the past
This commit is contained in:
parent
7839d6b4bf
commit
bea25a28cb
@ -273,6 +273,12 @@ export const superdough = async (value, t, hapDuration) => {
|
||||
value.duration = hapDuration;
|
||||
// calculate absolute time
|
||||
t = typeof t === 'string' && t.startsWith('=') ? Number(t.slice(1)) : ac.currentTime + t;
|
||||
if (t < ac.currentTime) {
|
||||
console.log(
|
||||
`[superdough]: cannot schedule sounds in the past (target: ${t.toFixed(2)}, now: ${ac.currentTime.toFixed(2)})`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
// destructure
|
||||
let {
|
||||
s = 'triangle',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user