@aelionsdk/audio 0.1.0-beta.1 → 1.1.0-rc.1

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/README.md CHANGED
@@ -1,7 +1,28 @@
1
- # @aelionsdk/audio
1
+ # `@aelionsdk/audio`
2
2
 
3
- AudioWorklet clock, PCM buffering and audio mixing for AelionSDK
3
+ Audio scheduling and deterministic PCM processing primitives for AelionSDK.
4
4
 
5
- Install with `npm install @aelionsdk/audio@next`.
5
+ ## Install
6
6
 
7
- Version 0.1.0-beta.1 is a prerelease and its API may change before the first stable release. This package is part of [AelionSDK](https://github.com/FoyonaCZY/AelionSDK); see the repository README for supported browsers, examples and deployment requirements.
7
+ ```bash
8
+ npm install @aelionsdk/audio@next
9
+ ```
10
+
11
+ `next` currently resolves to `1.1.0-rc.1`. Product applications should prefer
12
+ `@aelionsdk/sdk`; use this package directly when building a custom audio host,
13
+ analysis pipeline or renderer integration.
14
+
15
+ ## Public surface
16
+
17
+ - IR audio mixing and channel matrices;
18
+ - streaming resampling and pitch-preserving time stretch;
19
+ - SharedArrayBuffer and transferable PCM queues;
20
+ - AudioWorklet clocks, device state and video scheduling.
21
+
22
+ Queue and clock instances own browser and buffer resources. Stop producers,
23
+ cancel pending work and dispose the owning session or primitive when playback
24
+ ends.
25
+
26
+ See the [package map](https://foyonaczy.github.io/AelionSDK/reference/packages/)
27
+ and [API reference](https://foyonaczy.github.io/AelionSDK/api/aelionsdk/audio/overview/).
28
+ Licensed under MIT.
@@ -0,0 +1,3 @@
1
+ export declare function positiveInteger(value: number, name: string): void;
2
+ export declare function concat(left: Float32Array, right: Float32Array): Float32Array;
3
+ //# sourceMappingURL=pcm-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pcm-utils.d.ts","sourceRoot":"","sources":["../src/pcm-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAIjE;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAO5E"}
@@ -0,0 +1,15 @@
1
+ export function positiveInteger(value, name) {
2
+ if (!Number.isSafeInteger(value) || value <= 0) {
3
+ throw new RangeError(`${name} must be a positive safe integer`);
4
+ }
5
+ }
6
+ export function concat(left, right) {
7
+ if (left.length === 0)
8
+ return right.slice();
9
+ if (right.length === 0)
10
+ return left;
11
+ const result = new Float32Array(left.length + right.length);
12
+ result.set(left);
13
+ result.set(right, left.length);
14
+ return result;
15
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"resampler.d.ts","sourceRoot":"","sources":["../src/resampler.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAiBD;;;;;;;GAOG;AACH,qBAAa,qBAAqB;;gBAUb,OAAO,EAAE,4BAA4B;IAUxD,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,YAAY,IAAI,MAAM,CAEhC;IAEM,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,UAAQ,GAAG,YAAY;CAyDpE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,4BAA4B,GACpC,YAAY,CAEd"}
1
+ {"version":3,"file":"resampler.d.ts","sourceRoot":"","sources":["../src/resampler.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAqB;;gBAUb,OAAO,EAAE,4BAA4B;IAUxD,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,YAAY,IAAI,MAAM,CAEhC;IAEM,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,UAAQ,GAAG,YAAY;CAyDpE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,4BAA4B,GACpC,YAAY,CAEd"}
package/dist/resampler.js CHANGED
@@ -1,18 +1,4 @@
1
- function positiveInteger(value, name) {
2
- if (!Number.isSafeInteger(value) || value <= 0) {
3
- throw new RangeError(`${name} must be a positive safe integer`);
4
- }
5
- }
6
- function concat(left, right) {
7
- if (left.length === 0)
8
- return right.slice();
9
- if (right.length === 0)
10
- return left;
11
- const result = new Float32Array(left.length + right.length);
12
- result.set(left);
13
- result.set(right, left.length);
14
- return result;
15
- }
1
+ import { concat, positiveInteger } from './pcm-utils.js';
16
2
  /**
17
3
  * Deterministic, chunk-boundary-independent linear PCM resampler.
18
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"time-stretch.d.ts","sourceRoot":"","sources":["../src/time-stretch.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0CAA0C;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAiBD;;;;;;;GAOG;AACH,qBAAa,mCAAmC;;gBAiB3B,OAAO,EAAE,0CAA0C;IAkB/D,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,UAAQ,GAAG,YAAY;CAmHpE;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,GACzC,YAAY,CAwBd"}
1
+ {"version":3,"file":"time-stretch.d.ts","sourceRoot":"","sources":["../src/time-stretch.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0CAA0C;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,mCAAmC;;gBAiB3B,OAAO,EAAE,0CAA0C;IAkB/D,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,UAAQ,GAAG,YAAY;CAmHpE;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,GACzC,YAAY,CAwBd"}
@@ -1,18 +1,4 @@
1
- function positiveInteger(value, name) {
2
- if (!Number.isSafeInteger(value) || value <= 0) {
3
- throw new RangeError(`${name} must be a positive safe integer`);
4
- }
5
- }
6
- function concat(left, right) {
7
- if (left.length === 0)
8
- return right.slice();
9
- if (right.length === 0)
10
- return left;
11
- const result = new Float32Array(left.length + right.length);
12
- result.set(left);
13
- result.set(right, left.length);
14
- return result;
15
- }
1
+ import { concat, positiveInteger } from './pcm-utils.js';
16
2
  /**
17
3
  * Stateful deterministic synchronous overlap-add time stretch.
18
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aelionsdk/audio",
3
- "version": "0.1.0-beta.1",
3
+ "version": "1.1.0-rc.1",
4
4
  "description": "AudioWorklet clock, PCM buffering and audio mixing for AelionSDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,15 +27,15 @@
27
27
  "!dist/.tsbuildinfo"
28
28
  ],
29
29
  "engines": {
30
- "node": ">=20.19"
30
+ "node": ">=24 <25"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public",
34
34
  "provenance": true
35
35
  },
36
36
  "dependencies": {
37
- "@aelionsdk/core": "0.1.0-beta.1",
38
- "@aelionsdk/render-ir": "0.1.0-beta.1"
37
+ "@aelionsdk/core": "1.1.0-rc.1",
38
+ "@aelionsdk/render-ir": "1.1.0-rc.1"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b",