@grame/faustwasm 0.8.0 → 0.8.2
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/assets/standalone/create-node.js +31 -1
- package/assets/standalone/faust-ui/index.js +2 -2
- package/assets/standalone/faust-ui/index.js.map +1 -1
- package/assets/standalone/faustwasm/index.d.ts +2 -2
- package/assets/standalone/faustwasm/index.js +8 -36
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/assets/standalone/index-pwa.js +125 -90
- package/assets/standalone/index-template.js +43 -22
- package/assets/standalone/index.js +36 -19
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +8 -36
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +2 -2
- package/dist/cjs-bundle/index.js +8 -36
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +8 -36
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +2 -2
- package/dist/esm-bundle/index.js +8 -36
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +2 -2
- package/src/FaustAudioWorkletNode.ts +4 -30
- package/src/FaustScriptProcessorNode.ts +4 -30
- package/test/faustlive-wasm/faust-ui/index.js +2 -2
- package/test/faustlive-wasm/faust-ui/index.js.map +1 -1
- package/test/faustlive-wasm/faustwasm/index.d.ts +2 -2
- package/test/faustlive-wasm/faustwasm/index.js +8 -36
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
|
@@ -842,11 +842,11 @@ export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
|
|
|
842
842
|
getUI(): FaustUIDescriptor;
|
|
843
843
|
getDescriptors(): FaustUIInputItem[];
|
|
844
844
|
hasSoundfiles(): boolean;
|
|
845
|
+
startSensors(): void;
|
|
846
|
+
stopSensors(): void;
|
|
845
847
|
start(): void;
|
|
846
848
|
stop(): void;
|
|
847
849
|
destroy(): void;
|
|
848
|
-
startSensors(): void;
|
|
849
|
-
stopSensors(): void;
|
|
850
850
|
}
|
|
851
851
|
export declare class FaustMonoWebAudioDsp extends FaustBaseWebAudioDsp implements IFaustMonoWebAudioDsp {
|
|
852
852
|
private fInstance;
|
package/dist/cjs-bundle/index.js
CHANGED
|
@@ -8499,6 +8499,12 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
8499
8499
|
hasSoundfiles() {
|
|
8500
8500
|
return this.fSoundfiles.length > 0;
|
|
8501
8501
|
}
|
|
8502
|
+
startSensors() {
|
|
8503
|
+
this.startSensors();
|
|
8504
|
+
}
|
|
8505
|
+
stopSensors() {
|
|
8506
|
+
this.stopSensors();
|
|
8507
|
+
}
|
|
8502
8508
|
start() {
|
|
8503
8509
|
this.fProcessing = true;
|
|
8504
8510
|
}
|
|
@@ -8511,12 +8517,6 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
8511
8517
|
this.fComputeHandler = null;
|
|
8512
8518
|
this.fPlotHandler = null;
|
|
8513
8519
|
}
|
|
8514
|
-
startSensors() {
|
|
8515
|
-
this.startSensors();
|
|
8516
|
-
}
|
|
8517
|
-
stopSensors() {
|
|
8518
|
-
this.stopSensors();
|
|
8519
|
-
}
|
|
8520
8520
|
};
|
|
8521
8521
|
var FaustMonoWebAudioDsp = class extends FaustBaseWebAudioDsp {
|
|
8522
8522
|
constructor(instance, sampleRate, sampleSize, bufferSize, soundfiles) {
|
|
@@ -9965,42 +9965,14 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
9965
9965
|
async startSensors() {
|
|
9966
9966
|
if (this.hasAccInput) {
|
|
9967
9967
|
if (window.DeviceMotionEvent) {
|
|
9968
|
-
|
|
9969
|
-
try {
|
|
9970
|
-
const response = await window.DeviceMotionEvent.requestPermission();
|
|
9971
|
-
if (response === "granted") {
|
|
9972
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9973
|
-
} else if (response === "denied") {
|
|
9974
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
9975
|
-
throw new Error("Unable to access the accelerometer.");
|
|
9976
|
-
}
|
|
9977
|
-
} catch (error) {
|
|
9978
|
-
console.error(error);
|
|
9979
|
-
}
|
|
9980
|
-
} else {
|
|
9981
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9982
|
-
}
|
|
9968
|
+
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9983
9969
|
} else {
|
|
9984
9970
|
console.log("Cannot set the accelerometer handler.");
|
|
9985
9971
|
}
|
|
9986
9972
|
}
|
|
9987
9973
|
if (this.hasGyrInput) {
|
|
9988
9974
|
if (window.DeviceMotionEvent) {
|
|
9989
|
-
|
|
9990
|
-
try {
|
|
9991
|
-
const response = await window.DeviceOrientationEvent.requestPermission();
|
|
9992
|
-
if (response === "granted") {
|
|
9993
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
9994
|
-
} else if (response === "denied") {
|
|
9995
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
9996
|
-
throw new Error("Unable to access the gyroscope.");
|
|
9997
|
-
}
|
|
9998
|
-
} catch (error) {
|
|
9999
|
-
console.error(error);
|
|
10000
|
-
}
|
|
10001
|
-
} else {
|
|
10002
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
10003
|
-
}
|
|
9975
|
+
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
10004
9976
|
} else {
|
|
10005
9977
|
console.log("Cannot set the gyroscope handler.");
|
|
10006
9978
|
}
|