@opendaw/lib-fusion 0.0.73 → 0.0.75
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStreamReceiver.d.ts","sourceRoot":"","sources":["../../src/live-stream/LiveStreamReceiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,EACL,GAAG,EAIH,SAAS,EAET,YAAY,EACZ,UAAU,EACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAyG5D,qBAAa,kBAAmB,YAAW,UAAU;;IACjD,MAAM,CAAC,EAAE,EAAE,GAAG,CAAQ;;
|
|
1
|
+
{"version":3,"file":"LiveStreamReceiver.d.ts","sourceRoot":"","sources":["../../src/live-stream/LiveStreamReceiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,EACL,GAAG,EAIH,SAAS,EAET,YAAY,EACZ,UAAU,EACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAyG5D,qBAAa,kBAAmB,YAAW,UAAU;;IACjD,MAAM,CAAC,EAAE,EAAE,GAAG,CAAQ;;IA+BtB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU;IAgDzC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,YAAY;IAI3E,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY;IAI3E,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,YAAY;IAInF,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,YAAY;IAInF,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,YAAY;IAInF,SAAS,IAAI,IAAI;CAwDpB"}
|
|
@@ -99,6 +99,7 @@ export class LiveStreamReceiver {
|
|
|
99
99
|
#memory = Option.None;
|
|
100
100
|
#subscriptionFlags = Option.None;
|
|
101
101
|
#numPackages = 0;
|
|
102
|
+
#sabNumPackages = 0;
|
|
102
103
|
#structureVersion = -1;
|
|
103
104
|
#connected = false;
|
|
104
105
|
constructor() {
|
|
@@ -116,22 +117,19 @@ export class LiveStreamReceiver {
|
|
|
116
117
|
sendShareLock: (lock) => this.#optLock = Option.wrap(new Int8Array(lock)),
|
|
117
118
|
sendUpdateData: (data) => {
|
|
118
119
|
// SAB layout: [subscription flags (numPackages bytes)][data]
|
|
119
|
-
// Store the raw SAB
|
|
120
|
+
// Store the raw SAB and the numPackages it was created for
|
|
120
121
|
this.#sab = Option.wrap(data);
|
|
122
|
+
this.#sabNumPackages = this.#numPackages;
|
|
121
123
|
this.#updateDataViews();
|
|
122
124
|
},
|
|
123
125
|
sendUpdateStructure: (structure) => {
|
|
124
126
|
this.#updateStructure(new ByteArrayInput(structure));
|
|
125
|
-
// Always recreate views after structure update
|
|
126
|
-
// This handles both cases:
|
|
127
|
-
// 1. Structure arrives before SAB: #sab might be empty or old, views won't work but that's ok
|
|
128
|
-
// 2. SAB arrives before structure: #sab is new, now create correct views with new numPackages
|
|
129
127
|
this.#updateDataViews();
|
|
130
128
|
}
|
|
131
129
|
}), AnimationFrame.add(() => this.#dispatch()));
|
|
132
130
|
}
|
|
133
131
|
#updateDataViews() {
|
|
134
|
-
if (this.#sab.isEmpty() || this.#numPackages === 0) {
|
|
132
|
+
if (this.#sab.isEmpty() || this.#numPackages === 0 || this.#numPackages !== this.#sabNumPackages) {
|
|
135
133
|
return;
|
|
136
134
|
}
|
|
137
135
|
const data = this.#sab.unwrap();
|
|
@@ -144,6 +142,7 @@ export class LiveStreamReceiver {
|
|
|
144
142
|
this.#sab = Option.None;
|
|
145
143
|
this.#subscriptionFlags = Option.None;
|
|
146
144
|
this.#numPackages = 0;
|
|
145
|
+
this.#sabNumPackages = 0;
|
|
147
146
|
this.#structureVersion = -1;
|
|
148
147
|
this.#connected = false;
|
|
149
148
|
Arrays.clear(this.#procedures);
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
2
|
+
"name": "@opendaw/lib-fusion",
|
|
3
|
+
"version": "0.0.75",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"license": "LGPL-3.0-or-later",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/**/*"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"lint": "eslint \"**/*.ts\"",
|
|
23
|
+
"test": "vitest run"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@opendaw/lib-box": "^0.0.70",
|
|
27
|
+
"@opendaw/lib-dom": "^0.0.71",
|
|
28
|
+
"@opendaw/lib-runtime": "^0.0.67",
|
|
29
|
+
"@opendaw/lib-std": "^0.0.66"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@opendaw/eslint-config": "^0.0.27",
|
|
33
|
+
"@opendaw/typescript-config": "^0.0.28",
|
|
34
|
+
"jsdom": "^25.0.1",
|
|
35
|
+
"vitest": "^2.1.8"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "a23a423a60a8b0cebfb973224ffb6eddd6fb6943"
|
|
38
38
|
}
|