Fix release behavior; add multi-line example
This commit is contained in:
parent
d4b3a3b972
commit
e6e96c8603
3 changed files with 143 additions and 8 deletions
|
|
@ -1528,16 +1528,11 @@ class GenericProcessor extends AudioWorkletProcessor {
|
|||
}
|
||||
process(inputs, outputs) {
|
||||
const input = inputs[0]?.[0];
|
||||
if (currentTime > this.end) {
|
||||
if (currentTime >= this.end) {
|
||||
return false;
|
||||
}
|
||||
else if (this.genSample === undefined || currentTime < this.start) {
|
||||
} else if (this.genSample === undefined || currentTime < this.start) {
|
||||
// pending
|
||||
return true;
|
||||
} else if (input === undefined) {
|
||||
// if no input and started, return false and close worklet
|
||||
// else just keep waiting (true)
|
||||
return !this.started;
|
||||
}
|
||||
this.started = true;
|
||||
if (!this.gateEnded && currentTime > this.gateEnd) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue