@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/esm-bundle/index.js
CHANGED
|
@@ -8454,6 +8454,12 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
|
|
|
8454
8454
|
hasSoundfiles() {
|
|
8455
8455
|
return this.fSoundfiles.length > 0;
|
|
8456
8456
|
}
|
|
8457
|
+
startSensors() {
|
|
8458
|
+
this.startSensors();
|
|
8459
|
+
}
|
|
8460
|
+
stopSensors() {
|
|
8461
|
+
this.stopSensors();
|
|
8462
|
+
}
|
|
8457
8463
|
start() {
|
|
8458
8464
|
this.fProcessing = true;
|
|
8459
8465
|
}
|
|
@@ -8466,12 +8472,6 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
|
|
|
8466
8472
|
this.fComputeHandler = null;
|
|
8467
8473
|
this.fPlotHandler = null;
|
|
8468
8474
|
}
|
|
8469
|
-
startSensors() {
|
|
8470
|
-
this.startSensors();
|
|
8471
|
-
}
|
|
8472
|
-
stopSensors() {
|
|
8473
|
-
this.stopSensors();
|
|
8474
|
-
}
|
|
8475
8475
|
};
|
|
8476
8476
|
var FaustMonoWebAudioDsp = class extends FaustBaseWebAudioDsp {
|
|
8477
8477
|
constructor(instance, sampleRate, sampleSize, bufferSize, soundfiles) {
|
|
@@ -9920,42 +9920,14 @@ var FaustAudioWorkletNode = class extends (globalThis.AudioWorkletNode || null)
|
|
|
9920
9920
|
async startSensors() {
|
|
9921
9921
|
if (this.hasAccInput) {
|
|
9922
9922
|
if (window.DeviceMotionEvent) {
|
|
9923
|
-
|
|
9924
|
-
try {
|
|
9925
|
-
const response = await window.DeviceMotionEvent.requestPermission();
|
|
9926
|
-
if (response === "granted") {
|
|
9927
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9928
|
-
} else if (response === "denied") {
|
|
9929
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
9930
|
-
throw new Error("Unable to access the accelerometer.");
|
|
9931
|
-
}
|
|
9932
|
-
} catch (error) {
|
|
9933
|
-
console.error(error);
|
|
9934
|
-
}
|
|
9935
|
-
} else {
|
|
9936
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9937
|
-
}
|
|
9923
|
+
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
9938
9924
|
} else {
|
|
9939
9925
|
console.log("Cannot set the accelerometer handler.");
|
|
9940
9926
|
}
|
|
9941
9927
|
}
|
|
9942
9928
|
if (this.hasGyrInput) {
|
|
9943
9929
|
if (window.DeviceMotionEvent) {
|
|
9944
|
-
|
|
9945
|
-
try {
|
|
9946
|
-
const response = await window.DeviceOrientationEvent.requestPermission();
|
|
9947
|
-
if (response === "granted") {
|
|
9948
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
9949
|
-
} else if (response === "denied") {
|
|
9950
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
9951
|
-
throw new Error("Unable to access the gyroscope.");
|
|
9952
|
-
}
|
|
9953
|
-
} catch (error) {
|
|
9954
|
-
console.error(error);
|
|
9955
|
-
}
|
|
9956
|
-
} else {
|
|
9957
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
9958
|
-
}
|
|
9930
|
+
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
9959
9931
|
} else {
|
|
9960
9932
|
console.log("Cannot set the gyroscope handler.");
|
|
9961
9933
|
}
|