@flighthq/audio 0.5.1-next.903.f434bc2 → 0.5.1-next.905.5fbf787
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/package.json +4 -4
- package/src/audioResource.test.ts +6 -0
- package/src/audioResourceReference.test.ts +13 -0
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.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/audio)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
|
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.905.5fbf787",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/entity": "0.5.1-next.
|
|
42
|
-
"@flighthq/net": "0.5.1-next.
|
|
43
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/entity": "0.5.1-next.905.5fbf787",
|
|
42
|
+
"@flighthq/net": "0.5.1-next.905.5fbf787",
|
|
43
|
+
"@flighthq/types": "0.5.1-next.905.5fbf787"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"typescript": "^5.3.0"
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
getAudioResourceDuration,
|
|
9
9
|
getAudioResourceSampleRate,
|
|
10
10
|
hasAudioResourceBuffer,
|
|
11
|
+
initializeAudioResource,
|
|
11
12
|
isAudioResourceEmpty,
|
|
12
13
|
} from './audioResource';
|
|
13
14
|
|
|
@@ -118,6 +119,11 @@ describe('hasAudioResourceBuffer', () => {
|
|
|
118
119
|
});
|
|
119
120
|
});
|
|
120
121
|
|
|
122
|
+
describe('initializeAudioResource', () => {
|
|
123
|
+
it('is the construction initializer of createAudioResource', () => {
|
|
124
|
+
expect(typeof initializeAudioResource).toBe('function');
|
|
125
|
+
});
|
|
126
|
+
});
|
|
121
127
|
describe('isAudioResourceEmpty', () => {
|
|
122
128
|
it('is true without a buffer', () => {
|
|
123
129
|
expect(isAudioResourceEmpty(createAudioResource())).toBe(true);
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
createExternalAudioResourceReference,
|
|
11
11
|
explainAudioResourceReferenceResolution,
|
|
12
12
|
findAudioResourceReferenceByName,
|
|
13
|
+
initializeEmbeddedAudioResourceReference,
|
|
14
|
+
initializeExternalAudioResourceReference,
|
|
13
15
|
resetFailedAudioResourceReference,
|
|
14
16
|
resolveAudioResourceReference,
|
|
15
17
|
} from './audioResourceReference';
|
|
@@ -121,6 +123,17 @@ describe('findAudioResourceReferenceByName', () => {
|
|
|
121
123
|
});
|
|
122
124
|
});
|
|
123
125
|
|
|
126
|
+
describe('initializeEmbeddedAudioResourceReference', () => {
|
|
127
|
+
it('is the construction initializer of createEmbeddedAudioResourceReference', () => {
|
|
128
|
+
expect(typeof initializeEmbeddedAudioResourceReference).toBe('function');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe('initializeExternalAudioResourceReference', () => {
|
|
133
|
+
it('is the construction initializer of createExternalAudioResourceReference', () => {
|
|
134
|
+
expect(typeof initializeExternalAudioResourceReference).toBe('function');
|
|
135
|
+
});
|
|
136
|
+
});
|
|
124
137
|
describe('resetFailedAudioResourceReference', () => {
|
|
125
138
|
it('returns a failed reference to unresolved', () => {
|
|
126
139
|
const reference = createEmbeddedAudioResourceReference(new Uint8Array([1]));
|