add separate example buffer for playing examples

This commit is contained in:
2023-09-02 21:29:42 +02:00
parent cbec0626df
commit 517ba97c29
5 changed files with 54 additions and 15 deletions

View File

@ -21,7 +21,11 @@ export class TransportNode extends AudioWorkletNode {
const futureTimeStamp = this.app.clock.convertTicksToTimeposition(this.app.clock.tick);
this.app.clock.time_position = futureTimeStamp;
tryEvaluate(this.app, this.app.global_buffer);
if (this.app.exampleIsPlaying) {
tryEvaluate(this.app, this.app.example_buffer);
} else {
tryEvaluate(this.app, this.app.global_buffer);
}
}
};