tone 15.5.44 → 15.5.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Tone/source/Source.test.ts +26 -0
- package/Tone/source/Source.ts +3 -0
- package/Tone/version.ts +1 -1
- package/build/Tone.js +1 -1
- package/build/Tone.js.map +1 -1
- package/build/esm/source/Source.js +3 -0
- package/build/esm/source/Source.js.map +1 -1
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -395,5 +395,31 @@ describe("Source", () => {
|
|
|
395
395
|
expect(output.getValueAtTime(0.25)).to.be.closeTo(0.05, 0.01);
|
|
396
396
|
expect(output.getValueAtTime(0.3)).to.be.closeTo(0.1, 0.01);
|
|
397
397
|
});
|
|
398
|
+
|
|
399
|
+
it("does not replay a clip synced at time 0 after stopping and restarting at a later offset (#1417)", async () => {
|
|
400
|
+
let onStopCount = 0;
|
|
401
|
+
await Offline(({ transport }) => {
|
|
402
|
+
const source = new Player(rampBuffer).toDestination();
|
|
403
|
+
source.onstop = () => {
|
|
404
|
+
onStopCount++;
|
|
405
|
+
};
|
|
406
|
+
// rampBuffer duration is 1s. Sync at time 0 with duration 0.2s.
|
|
407
|
+
// This clip only spans [0, 0.2]. At transport time 0.4, it is over.
|
|
408
|
+
source.sync().start(0, 0, 0.2);
|
|
409
|
+
transport.start(0, 0);
|
|
410
|
+
|
|
411
|
+
return [
|
|
412
|
+
atTime(0.25, () => {
|
|
413
|
+
transport.stop();
|
|
414
|
+
}),
|
|
415
|
+
atTime(0.3, () => {
|
|
416
|
+
// restart past the clip duration at offset 0.4
|
|
417
|
+
transport.start(0.3, 0.4);
|
|
418
|
+
}),
|
|
419
|
+
];
|
|
420
|
+
}, 0.5);
|
|
421
|
+
|
|
422
|
+
expect(onStopCount).to.equal(1);
|
|
423
|
+
});
|
|
398
424
|
});
|
|
399
425
|
});
|
package/Tone/source/Source.ts
CHANGED
package/Tone/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version: string = "15.5.
|
|
1
|
+
export const version: string = "15.5.46";
|