mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-14 04:43:54 +00:00
Merge pull request #1159 from jdanford/update-standardized-audio-context
Update standardized-audio-context, fix little lint errors
This commit is contained in:
commit
47d464487e
11 changed files with 73 additions and 72 deletions
|
@ -200,7 +200,7 @@ export class TickSource<TypeName extends "bpm" | "hertz"> extends ToneWithContex
|
||||||
if (lastState.state === "started" && e.state !== "started") {
|
if (lastState.state === "started" && e.state !== "started") {
|
||||||
elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);
|
elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);
|
||||||
// do not memoize the temporary event
|
// do not memoize the temporary event
|
||||||
if (e.time != tmpEvent.time) {
|
if (e.time !== tmpEvent.time) {
|
||||||
eventToMemoize = { state: e.state, time: e.time, ticks: elapsedTicks };
|
eventToMemoize = { state: e.state, time: e.time, ticks: elapsedTicks };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ export class TickSource<TypeName extends "bpm" | "hertz"> extends ToneWithContex
|
||||||
if (lastState.state === "started" && e.state !== "started") {
|
if (lastState.state === "started" && e.state !== "started") {
|
||||||
elapsedSeconds += e.time - periodStartTime;
|
elapsedSeconds += e.time - periodStartTime;
|
||||||
// do not memoize the temporary event
|
// do not memoize the temporary event
|
||||||
if (e.time != tmpEvent.time) {
|
if (e.time !== tmpEvent.time) {
|
||||||
eventToMemoize = { state: e.state, time: e.time, seconds: elapsedSeconds };
|
eventToMemoize = { state: e.state, time: e.time, seconds: elapsedSeconds };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable key-spacing */
|
||||||
import { getContext } from "../Global";
|
import { getContext } from "../Global";
|
||||||
import { intervalToFrequencyRatio, mtof } from "./Conversions";
|
import { intervalToFrequencyRatio, mtof } from "./Conversions";
|
||||||
import { ftom, getA4, setA4 } from "./Conversions";
|
import { ftom, getA4, setA4 } from "./Conversions";
|
||||||
|
|
|
@ -32,7 +32,7 @@ type ToneObject = {
|
||||||
* Bind the TimeBaseClass to the context
|
* Bind the TimeBaseClass to the context
|
||||||
*/
|
*/
|
||||||
function bindTypeClass(context: Context, type) {
|
function bindTypeClass(context: Context, type) {
|
||||||
return (...args: any[]) => new type(context, ...args);
|
return (...args: unknown[]) => new type(context, ...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -709,12 +709,12 @@ describe("Player", () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
player.restart(undefined, undefined, 1);
|
player.restart(undefined, undefined, 1);
|
||||||
const checkStopTimes = new Set();
|
const checkStopTimes = new Set();
|
||||||
player["_activeSources"].forEach(source => {
|
player._activeSources.forEach(source => {
|
||||||
checkStopTimes.add(source["_stopTime"]);
|
checkStopTimes.add(source._stopTime);
|
||||||
});
|
});
|
||||||
getContext().lookAhead = originalLookAhead;
|
getContext().lookAhead = originalLookAhead;
|
||||||
// ensure each source has a different stopTime
|
// ensure each source has a different stopTime
|
||||||
expect(checkStopTimes.size).to.equal(player["_activeSources"].size);
|
expect(checkStopTimes.size).to.equal(player._activeSources.size);
|
||||||
done();
|
done();
|
||||||
}, 250);
|
}, 250);
|
||||||
},
|
},
|
||||||
|
|
88
package-lock.json
generated
88
package-lock.json
generated
|
@ -9,7 +9,7 @@
|
||||||
"version": "14.8.0",
|
"version": "14.8.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"standardized-audio-context": "^25.3.29",
|
"standardized-audio-context": "^25.3.37",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -417,20 +417,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime": {
|
"node_modules/@babel/runtime": {
|
||||||
"version": "7.18.9",
|
"version": "7.20.13",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz",
|
||||||
"integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",
|
"integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"regenerator-runtime": "^0.13.4"
|
"regenerator-runtime": "^0.13.11"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime/node_modules/regenerator-runtime": {
|
"node_modules/@babel/runtime/node_modules/regenerator-runtime": {
|
||||||
"version": "0.13.9",
|
"version": "0.13.11",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
||||||
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
|
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
||||||
},
|
},
|
||||||
"node_modules/@babel/template": {
|
"node_modules/@babel/template": {
|
||||||
"version": "7.18.10",
|
"version": "7.18.10",
|
||||||
|
@ -1544,15 +1544,15 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/automation-events": {
|
"node_modules/automation-events": {
|
||||||
"version": "4.0.20",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-4.0.20.tgz",
|
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-5.0.0.tgz",
|
||||||
"integrity": "sha512-ALTOLrB4vTyXOsLPia8OKM1qZKtlsGC+3VDe3jcCGUpvgKTbqlzvaJU3HqDhU6jlVEMMBqT01XZv3K/3Z5g29w==",
|
"integrity": "sha512-SkYa2YBwgRUJNsR5v6GxeJwP5IGnYtOMW37coplTOWMUpDYYrk5j8gGOhYa765rchRln/HssFzMAck/2P6zTFw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.20.7",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.20.1"
|
"node": ">=14.15.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/available-typed-arrays": {
|
"node_modules/available-typed-arrays": {
|
||||||
|
@ -8780,13 +8780,13 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/standardized-audio-context": {
|
"node_modules/standardized-audio-context": {
|
||||||
"version": "25.3.29",
|
"version": "25.3.37",
|
||||||
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.29.tgz",
|
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.37.tgz",
|
||||||
"integrity": "sha512-5RqrvuaphiR3W2t8nd8PRBhQKXTTf0gHu8I0BukH3A11C9ZHQQmeE9WywBe68TcYBj9DCm42db8OWTw1PluLUA==",
|
"integrity": "sha512-lr0+RH/IJXYMts95oYKIJ+orTmstOZN3GXWVGmlkbMj8OLahREkRh7DhNGLYgBGDkBkhhc4ev5pYGSFN3gltHw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.20.7",
|
||||||
"automation-events": "^4.0.20",
|
"automation-events": "^5.0.0",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/statuses": {
|
"node_modules/statuses": {
|
||||||
|
@ -9427,9 +9427,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
||||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
||||||
},
|
},
|
||||||
"node_modules/tsutils": {
|
"node_modules/tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
|
@ -10650,17 +10650,17 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@babel/runtime": {
|
"@babel/runtime": {
|
||||||
"version": "7.18.9",
|
"version": "7.20.13",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz",
|
||||||
"integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",
|
"integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"regenerator-runtime": "^0.13.4"
|
"regenerator-runtime": "^0.13.11"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.9",
|
"version": "0.13.11",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
||||||
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
|
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11552,12 +11552,12 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"automation-events": {
|
"automation-events": {
|
||||||
"version": "4.0.20",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-4.0.20.tgz",
|
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-5.0.0.tgz",
|
||||||
"integrity": "sha512-ALTOLrB4vTyXOsLPia8OKM1qZKtlsGC+3VDe3jcCGUpvgKTbqlzvaJU3HqDhU6jlVEMMBqT01XZv3K/3Z5g29w==",
|
"integrity": "sha512-SkYa2YBwgRUJNsR5v6GxeJwP5IGnYtOMW37coplTOWMUpDYYrk5j8gGOhYa765rchRln/HssFzMAck/2P6zTFw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.20.7",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"available-typed-arrays": {
|
"available-typed-arrays": {
|
||||||
|
@ -17292,13 +17292,13 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"standardized-audio-context": {
|
"standardized-audio-context": {
|
||||||
"version": "25.3.29",
|
"version": "25.3.37",
|
||||||
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.29.tgz",
|
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.37.tgz",
|
||||||
"integrity": "sha512-5RqrvuaphiR3W2t8nd8PRBhQKXTTf0gHu8I0BukH3A11C9ZHQQmeE9WywBe68TcYBj9DCm42db8OWTw1PluLUA==",
|
"integrity": "sha512-lr0+RH/IJXYMts95oYKIJ+orTmstOZN3GXWVGmlkbMj8OLahREkRh7DhNGLYgBGDkBkhhc4ev5pYGSFN3gltHw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.20.7",
|
||||||
"automation-events": "^4.0.20",
|
"automation-events": "^5.0.0",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
|
@ -17781,9 +17781,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
||||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
"yargs": "^17.3.0"
|
"yargs": "^17.3.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"standardized-audio-context": "^25.3.29",
|
"standardized-audio-context": "^25.3.37",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.3.1"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
|
|
Loading…
Reference in a new issue