@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
|
@@ -835,11 +835,11 @@ export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
|
|
|
835
835
|
getUI(): FaustUIDescriptor;
|
|
836
836
|
getDescriptors(): FaustUIInputItem[];
|
|
837
837
|
hasSoundfiles(): boolean;
|
|
838
|
+
startSensors(): void;
|
|
839
|
+
stopSensors(): void;
|
|
838
840
|
start(): void;
|
|
839
841
|
stop(): void;
|
|
840
842
|
destroy(): void;
|
|
841
|
-
startSensors(): void;
|
|
842
|
-
stopSensors(): void;
|
|
843
843
|
}
|
|
844
844
|
export declare class FaustMonoWebAudioDsp extends FaustBaseWebAudioDsp implements IFaustMonoWebAudioDsp {
|
|
845
845
|
private fInstance;
|
|
@@ -2452,6 +2452,12 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
|
|
|
2452
2452
|
hasSoundfiles() {
|
|
2453
2453
|
return this.fSoundfiles.length > 0;
|
|
2454
2454
|
}
|
|
2455
|
+
startSensors() {
|
|
2456
|
+
this.startSensors();
|
|
2457
|
+
}
|
|
2458
|
+
stopSensors() {
|
|
2459
|
+
this.stopSensors();
|
|
2460
|
+
}
|
|
2455
2461
|
start() {
|
|
2456
2462
|
this.fProcessing = true;
|
|
2457
2463
|
}
|
|
@@ -2464,12 +2470,6 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
|
|
|
2464
2470
|
this.fComputeHandler = null;
|
|
2465
2471
|
this.fPlotHandler = null;
|
|
2466
2472
|
}
|
|
2467
|
-
startSensors() {
|
|
2468
|
-
this.startSensors();
|
|
2469
|
-
}
|
|
2470
|
-
stopSensors() {
|
|
2471
|
-
this.stopSensors();
|
|
2472
|
-
}
|
|
2473
2473
|
};
|
|
2474
2474
|
var FaustMonoWebAudioDsp = class extends FaustBaseWebAudioDsp {
|
|
2475
2475
|
constructor(instance, sampleRate, sampleSize, bufferSize, soundfiles) {
|
|
@@ -3918,42 +3918,14 @@ var FaustAudioWorkletNode = class extends (globalThis.AudioWorkletNode || null)
|
|
|
3918
3918
|
async startSensors() {
|
|
3919
3919
|
if (this.hasAccInput) {
|
|
3920
3920
|
if (window.DeviceMotionEvent) {
|
|
3921
|
-
|
|
3922
|
-
try {
|
|
3923
|
-
const response = await window.DeviceMotionEvent.requestPermission();
|
|
3924
|
-
if (response === "granted") {
|
|
3925
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
3926
|
-
} else if (response === "denied") {
|
|
3927
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
3928
|
-
throw new Error("Unable to access the accelerometer.");
|
|
3929
|
-
}
|
|
3930
|
-
} catch (error) {
|
|
3931
|
-
console.error(error);
|
|
3932
|
-
}
|
|
3933
|
-
} else {
|
|
3934
|
-
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
3935
|
-
}
|
|
3921
|
+
window.addEventListener("devicemotion", this.handleDeviceMotion, true);
|
|
3936
3922
|
} else {
|
|
3937
3923
|
console.log("Cannot set the accelerometer handler.");
|
|
3938
3924
|
}
|
|
3939
3925
|
}
|
|
3940
3926
|
if (this.hasGyrInput) {
|
|
3941
3927
|
if (window.DeviceMotionEvent) {
|
|
3942
|
-
|
|
3943
|
-
try {
|
|
3944
|
-
const response = await window.DeviceOrientationEvent.requestPermission();
|
|
3945
|
-
if (response === "granted") {
|
|
3946
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
3947
|
-
} else if (response === "denied") {
|
|
3948
|
-
alert("You have denied access to motion and orientation data. To enable it, go to Settings > Safari > Motion & Orientation Access.");
|
|
3949
|
-
throw new Error("Unable to access the gyroscope.");
|
|
3950
|
-
}
|
|
3951
|
-
} catch (error) {
|
|
3952
|
-
console.error(error);
|
|
3953
|
-
}
|
|
3954
|
-
} else {
|
|
3955
|
-
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
3956
|
-
}
|
|
3928
|
+
window.addEventListener("deviceorientation", this.handleDeviceOrientation, true);
|
|
3957
3929
|
} else {
|
|
3958
3930
|
console.log("Cannot set the gyroscope handler.");
|
|
3959
3931
|
}
|