@flighthq/audio 0.5.1-next.704.19c91ec → 0.5.1-next.729.2aeb707
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 +2 -2
- package/dist/audioResource.d.ts.map +1 -1
- package/dist/audioResource.js +3 -2
- package/dist/audioResource.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/audio`. The `@flight
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/audio@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/audio@0.5.1-next.729.2aeb707](https://github.com/flighthq/flight/tree/2aeb707259007d61c5aaf2e31fe47447a260fe2a/packages/audio)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/2aeb707259007d61c5aaf2e31fe47447a260fe2a/LICENSE.md)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioResource.d.ts","sourceRoot":"","sources":["../src/audioResource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audioResource.d.ts","sourceRoot":"","sources":["../src/audioResource.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM9D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,aAAa,CAEnF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,aAAa,CAEvE;AAID,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAElE;AAID,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,MAAM,CAGlF;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,MAAM,CAEtF;AAKD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAInH;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,MAAM,CAElF;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,MAAM,CAEpF;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,OAAO,CAEjF;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,OAAO,CAE/E"}
|
package/dist/audioResource.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { createEntity } from '@flighthq/entity/contract';
|
|
1
2
|
// Allocates a new resource identity over the SAME underlying AudioBuffer. The buffer is shared by
|
|
2
3
|
// reference, not duplicated — clone gives an independent resource object over the same decoded PCM,
|
|
3
4
|
// e.g. to hand one decoded sound to two playback subsystems. Use createAudioResourceFromSamples with
|
|
4
5
|
// copied channel data when you need the samples themselves duplicated.
|
|
5
6
|
export function cloneAudioResource(resource) {
|
|
6
|
-
return { buffer: resource.buffer };
|
|
7
|
+
return createEntity({ buffer: resource.buffer });
|
|
7
8
|
}
|
|
8
9
|
export function createAudioResource(buffer) {
|
|
9
|
-
return { buffer: buffer ?? null };
|
|
10
|
+
return createEntity({ buffer: buffer ?? null });
|
|
10
11
|
}
|
|
11
12
|
// Releases the decoded AudioBuffer reference so it becomes eligible for GC. The AudioBuffer is plain
|
|
12
13
|
// GC-managed memory with no GPU/native handle to free, so this is dispose*, not destroy*.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioResource.js","sourceRoot":"","sources":["../src/audioResource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audioResource.js","sourceRoot":"","sources":["../src/audioResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,kGAAkG;AAClG,oGAAoG;AACpG,qGAAqG;AACrG,uEAAuE;AACvE,MAAM,UAAU,kBAAkB,CAAC,QAAiC;IAClE,OAAO,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAoB;IACtD,OAAO,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,qGAAqG;AACrG,0FAA0F;AAC1F,MAAM,UAAU,oBAAoB,CAAC,QAAuB;IAC1D,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;AACzB,CAAC;AAED,oGAAoG;AACpG,kFAAkF;AAClF,MAAM,UAAU,wBAAwB,CAAC,QAAiC;IACxE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,QAAiC;IAC5E,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,qGAAqG;AACrG,iGAAiG;AACjG,uCAAuC;AACvC,MAAM,UAAU,2BAA2B,CAAC,QAAiC,EAAE,OAAe;IAC5F,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,IAAI,MAAM,CAAC,gBAAgB;QAAE,OAAO,IAAI,CAAC;IACtF,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAiC;IACxE,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,QAAiC;IAC1E,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,QAAiC;IACtE,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAiC;IACpE,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/audio",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.729.2aeb707",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/
|
|
42
|
-
"@flighthq/
|
|
41
|
+
"@flighthq/entity": "0.5.1-next.729.2aeb707",
|
|
42
|
+
"@flighthq/net": "0.5.1-next.729.2aeb707",
|
|
43
|
+
"@flighthq/types": "0.5.1-next.729.2aeb707"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"typescript": "^5.3.0"
|