@viji-dev/core 0.5.5 → 0.5.7
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/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +1 -1
- package/dist/artist-global.d.ts +1 -1
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-C58CPq4U.js → essentia-wasm.web-htE1Skqw.js} +2 -2
- package/dist/{essentia-wasm.web-C58CPq4U.js.map → essentia-wasm.web-htE1Skqw.js.map} +1 -1
- package/dist/{index-DsJxKERc.js → index-CwwVLcjs.js} +122 -21
- package/dist/index-CwwVLcjs.js.map +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-DsJxKERc.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -218,6 +218,14 @@ export declare class AudioSystem {
|
|
|
218
218
|
private lastPhaseLogTime;
|
|
219
219
|
private onsetLogBuffer;
|
|
220
220
|
private debugMode;
|
|
221
|
+
/**
|
|
222
|
+
* One-way lifecycle flag flipped at the top of `resetAudioState()`.
|
|
223
|
+
* Gates re-entry into `ensureAudioContext()` and the public stream-mutation
|
|
224
|
+
* entry points so an in-flight async caller (e.g. a worker RPC firing
|
|
225
|
+
* mid-teardown) cannot resurrect a fresh `AudioContext` after destroy
|
|
226
|
+
* has already nulled the field. AudioSystem is single-use after reset.
|
|
227
|
+
*/
|
|
228
|
+
private destroyed;
|
|
221
229
|
private diagnosticLogger;
|
|
222
230
|
private onsetDetection;
|
|
223
231
|
private essentiaOnsetDetection;
|
|
@@ -419,8 +427,13 @@ export declare class AudioSystem {
|
|
|
419
427
|
/**
|
|
420
428
|
* Reset all audio state (called when destroying).
|
|
421
429
|
* Disconnects all channels, closes AudioContext, resets all modules.
|
|
430
|
+
*
|
|
431
|
+
* Returns a Promise that resolves once `AudioContext.close()` has fully
|
|
432
|
+
* transitioned the context to `closed`. Callers tearing the system down
|
|
433
|
+
* (e.g. `VijiCore.destroy()`) MUST await this; otherwise Blink keeps the
|
|
434
|
+
* context alive in `Pending activities` and leaks ~4 MB per cycle.
|
|
422
435
|
*/
|
|
423
|
-
resetAudioState(): void
|
|
436
|
+
resetAudioState(): Promise<void>;
|
|
424
437
|
/**
|
|
425
438
|
* Add an additional audio stream (lightweight analysis, no beat detection).
|
|
426
439
|
* @param streamIndex Global stream index (from VijiCore: AUDIO_ADDITIONAL_BASE + n or AUDIO_DEVICE_BASE + n)
|
|
@@ -2254,7 +2267,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
|
|
|
2254
2267
|
/** Returned by `on*` listener registration calls; invoke to unsubscribe. */
|
|
2255
2268
|
export declare type Unsubscribe = () => void;
|
|
2256
2269
|
|
|
2257
|
-
export declare const VERSION = "0.5.
|
|
2270
|
+
export declare const VERSION = "0.5.7";
|
|
2258
2271
|
|
|
2259
2272
|
/**
|
|
2260
2273
|
* Real-time video API: drawable frame, dimensions, and the source-side
|
package/dist/index.js
CHANGED