@yume-chan/pcm-player 0.0.21 → 0.0.23
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/CHANGELOG.json +18 -0
- package/CHANGELOG.md +13 -1
- package/README.md +5 -4
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +15 -2
- package/esm/index.js.map +1 -1
- package/esm/worker.js +168 -63
- package/esm/worker.js.map +1 -1
- package/package.json +9 -9
- package/src/index.ts +18 -2
- package/tsconfig.dom.json +9 -8
- package/tsconfig.dom.tsbuildinfo +1 -1
- package/tsconfig.worker.tsbuildinfo +1 -1
- package/worker/worker.ts +226 -98
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/pcm-player",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.0.23",
|
|
6
|
+
"tag": "@yume-chan/pcm-player_v0.0.23",
|
|
7
|
+
"date": "Thu, 21 Mar 2024 03:15:10 GMT",
|
|
8
|
+
"comments": {}
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.0.22",
|
|
12
|
+
"tag": "@yume-chan/pcm-player_v0.0.22",
|
|
13
|
+
"date": "Wed, 13 Dec 2023 05:57:27 GMT",
|
|
14
|
+
"comments": {
|
|
15
|
+
"none": [
|
|
16
|
+
{
|
|
17
|
+
"comment": "Add basic OLA algorithm to speed up playback when buffer is too high"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
4
22
|
{
|
|
5
23
|
"version": "0.0.21",
|
|
6
24
|
"tag": "@yume-chan/pcm-player_v0.0.21",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @yume-chan/pcm-player
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 21 Mar 2024 03:15:10 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.0.23
|
|
6
|
+
Thu, 21 Mar 2024 03:15:10 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 0.0.22
|
|
11
|
+
Wed, 13 Dec 2023 05:57:27 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- Add basic OLA algorithm to speed up playback when buffer is too high
|
|
4
16
|
|
|
5
17
|
## 0.0.21
|
|
6
18
|
Fri, 25 Aug 2023 14:05:18 GMT
|
package/README.md
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Play raw audio sample stream using Web Audio API.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- [
|
|
7
|
+
- [x] Arbitrary channel count
|
|
8
|
+
- [x] Arbitrary sample rate
|
|
9
|
+
- [x] Basic OLA (overlap-add) resampler
|
|
10
|
+
- [ ] Adjustable buffer size
|
|
10
11
|
|
|
11
12
|
## Usage
|
|
12
13
|
|
package/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare abstract class PcmPlayer<T> {
|
|
2
2
|
#private;
|
|
3
3
|
protected abstract sourceName: string;
|
|
4
|
-
constructor(sampleRate: number);
|
|
4
|
+
constructor(sampleRate: number, channelCount: number);
|
|
5
5
|
protected abstract feedCore(worklet: AudioWorkletNode, source: T): void;
|
|
6
6
|
feed(source: T): void;
|
|
7
7
|
start(): Promise<void>;
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAAsB,SAAS,CAAC,CAAC;;IAC7B,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAAsB,SAAS,CAAC,CAAC;;IAC7B,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAQ1B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAQpD,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI;IAEvE,IAAI,CAAC,MAAM,EAAE,CAAC;IAaR,KAAK;IAsBL,IAAI;CAWb;AAED,qBAAa,cAAe,SAAQ,SAAS,CAAC,UAAU,CAAC;IACrD,UAAmB,UAAU,SAA4B;cAEtC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU;CAW5E;AAED,qBAAa,gBAAiB,SAAQ,SAAS,CAAC,YAAY,CAAC;IACzD,UAAmB,UAAU,SAA8B;cAExC,QAAQ,CACvB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,YAAY;CAY3B;AAED,qBAAa,sBAAuB,SAAQ,SAAS,CAAC,YAAY,EAAE,CAAC;IACjE,UAAmB,UAAU,SAAqC;cAE/C,QAAQ,CACvB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,YAAY,EAAE;CAa7B"}
|
package/esm/index.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
export class PcmPlayer {
|
|
2
2
|
#context;
|
|
3
|
+
#channelCount;
|
|
3
4
|
#worklet;
|
|
4
5
|
#buffers = [];
|
|
5
|
-
|
|
6
|
+
#stopped = false;
|
|
7
|
+
constructor(sampleRate, channelCount) {
|
|
6
8
|
this.#context = new AudioContext({
|
|
7
9
|
latencyHint: "interactive",
|
|
8
10
|
sampleRate,
|
|
9
11
|
});
|
|
12
|
+
this.#channelCount = channelCount;
|
|
10
13
|
}
|
|
11
14
|
feed(source) {
|
|
15
|
+
if (this.#stopped) {
|
|
16
|
+
throw new Error("PcmPlayer is stopped");
|
|
17
|
+
}
|
|
12
18
|
if (this.#worklet === undefined) {
|
|
13
19
|
this.#buffers.push(source);
|
|
14
20
|
return;
|
|
@@ -17,10 +23,13 @@ export class PcmPlayer {
|
|
|
17
23
|
}
|
|
18
24
|
async start() {
|
|
19
25
|
await this.#context.audioWorklet.addModule(new URL("./worker.js", import.meta.url));
|
|
26
|
+
if (this.#stopped) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
20
29
|
this.#worklet = new AudioWorkletNode(this.#context, this.sourceName, {
|
|
21
30
|
numberOfInputs: 0,
|
|
22
31
|
numberOfOutputs: 1,
|
|
23
|
-
outputChannelCount: [
|
|
32
|
+
outputChannelCount: [this.#channelCount],
|
|
24
33
|
});
|
|
25
34
|
this.#worklet.connect(this.#context.destination);
|
|
26
35
|
for (const source of this.#buffers) {
|
|
@@ -29,6 +38,10 @@ export class PcmPlayer {
|
|
|
29
38
|
this.#buffers.length = 0;
|
|
30
39
|
}
|
|
31
40
|
async stop() {
|
|
41
|
+
if (this.#stopped) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.#stopped = true;
|
|
32
45
|
this.#worklet?.disconnect();
|
|
33
46
|
this.#worklet = undefined;
|
|
34
47
|
await this.#context.close();
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,SAAS;IAG3B,QAAQ,CAAe;IACvB,QAAQ,CAA+B;IACvC,QAAQ,GAAQ,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,SAAS;IAG3B,QAAQ,CAAe;IACvB,aAAa,CAAS;IACtB,QAAQ,CAA+B;IACvC,QAAQ,GAAQ,EAAE,CAAC;IACnB,QAAQ,GAAG,KAAK,CAAC;IAEjB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IACjD,CAAC;CACJ;AAED,MAAM,OAAO,sBAAuB,SAAQ,SAAyB;IAC9C,UAAU,GAAG,iCAAiC,CAAC;IAE/C,QAAQ,CACvB,OAAyB,EACzB,MAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACnC,IACI,OAAO,CAAC,UAAU,KAAK,CAAC;gBACxB,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,UAAU,EAClD,CAAC;gBACC,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;YAC9B,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACJ"}
|
package/esm/worker.js
CHANGED
|
@@ -1,97 +1,199 @@
|
|
|
1
|
+
const INPUT_HOP_SIZE = 3000;
|
|
2
|
+
const SCALE = 0.9;
|
|
3
|
+
const OUTPUT_HOP_SIZE = (INPUT_HOP_SIZE * SCALE) | 0;
|
|
4
|
+
const WINDOW_SIZE = 6000;
|
|
5
|
+
const WINDOW_WEIGHT_TABLE = new Float32Array(WINDOW_SIZE);
|
|
6
|
+
for (let i = 0; i < WINDOW_SIZE / 2; i += 1) {
|
|
7
|
+
const value = Math.sin((i / WINDOW_SIZE) * Math.PI);
|
|
8
|
+
WINDOW_WEIGHT_TABLE[i] = value;
|
|
9
|
+
WINDOW_WEIGHT_TABLE[WINDOW_SIZE - i - 1] = value;
|
|
10
|
+
}
|
|
1
11
|
class SourceProcessor extends AudioWorkletProcessor {
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
|
|
12
|
+
channelCount;
|
|
13
|
+
#readBuffer;
|
|
14
|
+
#chunks = [];
|
|
15
|
+
#chunkSampleCounts = [];
|
|
16
|
+
#totalSampleCount = 0;
|
|
17
|
+
#starting = true;
|
|
18
|
+
#speedUp = false;
|
|
19
|
+
#readOffset = 0;
|
|
20
|
+
#inputOffset = 0;
|
|
21
|
+
#outputOffset = 0;
|
|
22
|
+
constructor(options) {
|
|
5
23
|
super();
|
|
24
|
+
this.channelCount = options.outputChannelCount[0];
|
|
25
|
+
this.#readBuffer = new Float32Array(this.channelCount);
|
|
6
26
|
this.port.onmessage = (event) => {
|
|
27
|
+
while (this.#totalSampleCount > 0.35 * 48000) {
|
|
28
|
+
this.#chunks.shift();
|
|
29
|
+
const count = this.#chunkSampleCounts.shift();
|
|
30
|
+
this.#totalSampleCount -= count;
|
|
31
|
+
}
|
|
7
32
|
const data = event.data;
|
|
8
33
|
const [source, length] = this.createSource(data);
|
|
9
|
-
this.#
|
|
10
|
-
this.#
|
|
34
|
+
this.#chunks.push(source);
|
|
35
|
+
this.#chunkSampleCounts.push(length);
|
|
36
|
+
this.#totalSampleCount += length;
|
|
37
|
+
if (!this.#speedUp && this.#totalSampleCount > 0.25 * 48000) {
|
|
38
|
+
this.#speedUp = true;
|
|
39
|
+
this.#readOffset = 0;
|
|
40
|
+
this.#inputOffset = 0;
|
|
41
|
+
this.#outputOffset = 0;
|
|
42
|
+
}
|
|
11
43
|
};
|
|
12
44
|
}
|
|
13
|
-
process(_inputs, outputs) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
45
|
+
process(_inputs, [outputs]) {
|
|
46
|
+
if (this.#starting) {
|
|
47
|
+
if (this.#totalSampleCount < 0.1 * 48000) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.#starting = false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (this.#speedUp && this.#totalSampleCount < 0.15 * 48000) {
|
|
55
|
+
this.#speedUp = false;
|
|
56
|
+
this.#starting = true;
|
|
57
|
+
}
|
|
58
|
+
const outputLength = outputs[0].length;
|
|
59
|
+
if (this.#speedUp) {
|
|
60
|
+
for (let i = 0; i < outputLength; i += 1) {
|
|
61
|
+
let totalWeight = 0;
|
|
62
|
+
const firstWindow = Math.max(0, Math.floor((this.#outputOffset - WINDOW_SIZE) / OUTPUT_HOP_SIZE) + 1);
|
|
63
|
+
let inWindowIndex = this.#outputOffset - firstWindow * OUTPUT_HOP_SIZE;
|
|
64
|
+
let inputIndex = firstWindow * INPUT_HOP_SIZE + inWindowIndex;
|
|
65
|
+
while (inputIndex > 0 && inWindowIndex >= 0) {
|
|
66
|
+
this.#read(inputIndex - this.#readOffset);
|
|
67
|
+
const weight = WINDOW_WEIGHT_TABLE[inWindowIndex];
|
|
68
|
+
for (let j = 0; j < this.channelCount; j += 1) {
|
|
69
|
+
outputs[j][i] += this.#readBuffer[j] * weight;
|
|
70
|
+
}
|
|
71
|
+
totalWeight += weight;
|
|
72
|
+
inputIndex += INPUT_HOP_SIZE - OUTPUT_HOP_SIZE;
|
|
73
|
+
inWindowIndex -= OUTPUT_HOP_SIZE;
|
|
74
|
+
}
|
|
75
|
+
if (totalWeight > 0) {
|
|
76
|
+
for (let j = 0; j < this.channelCount; j += 1) {
|
|
77
|
+
outputs[j][i] /= totalWeight;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
this.#outputOffset += 1;
|
|
81
|
+
if (firstWindow > 0) {
|
|
82
|
+
this.#outputOffset -= OUTPUT_HOP_SIZE;
|
|
83
|
+
this.#readOffset -= INPUT_HOP_SIZE;
|
|
84
|
+
this.#inputOffset += (1 - SCALE) * INPUT_HOP_SIZE;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
this.#inputOffset += outputLength;
|
|
88
|
+
const firstChunkSampleCount = this.#chunkSampleCounts[0];
|
|
89
|
+
if (firstChunkSampleCount !== undefined &&
|
|
90
|
+
this.#inputOffset >= firstChunkSampleCount) {
|
|
91
|
+
this.#chunks.shift();
|
|
92
|
+
this.#chunkSampleCounts.shift();
|
|
93
|
+
this.#totalSampleCount -= firstChunkSampleCount;
|
|
94
|
+
this.#readOffset += firstChunkSampleCount;
|
|
95
|
+
this.#inputOffset -= firstChunkSampleCount;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.#copyChunks(outputs);
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
#copyChunks(outputs) {
|
|
17
104
|
let outputIndex = 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const beginSourceIndex = sourceIndex | 0;
|
|
25
|
-
let source = this.#sources[0];
|
|
26
|
-
[source, sourceIndex, outputIndex] = this.copyChunk(sourceIndex, sourceIndexStep, source, outputLeft, outputRight, outputLength, outputIndex);
|
|
27
|
-
const consumedSampleCount = (sourceIndex | 0) - beginSourceIndex;
|
|
28
|
-
this.#sourceSampleCount -= consumedSampleCount;
|
|
29
|
-
sourceIndex -= consumedSampleCount;
|
|
105
|
+
const outputLength = outputs[0].length;
|
|
106
|
+
while (this.#chunks.length > 0 && outputIndex < outputLength) {
|
|
107
|
+
let source = this.#chunks[0];
|
|
108
|
+
let consumedSampleCount = 0;
|
|
109
|
+
[source, consumedSampleCount, outputIndex] = this.copyChunk(source, outputs, outputLength, outputIndex);
|
|
110
|
+
this.#totalSampleCount -= consumedSampleCount;
|
|
30
111
|
if (source) {
|
|
31
112
|
// Output full
|
|
32
|
-
this.#
|
|
33
|
-
|
|
113
|
+
this.#chunks[0] = source;
|
|
114
|
+
this.#chunkSampleCounts[0] -= consumedSampleCount;
|
|
115
|
+
return;
|
|
34
116
|
}
|
|
35
|
-
this.#
|
|
117
|
+
this.#chunks.shift();
|
|
118
|
+
this.#chunkSampleCounts.shift();
|
|
36
119
|
}
|
|
37
|
-
|
|
38
|
-
|
|
120
|
+
}
|
|
121
|
+
#read(offset) {
|
|
122
|
+
for (let i = 0; i < this.#chunks.length; i += 1) {
|
|
123
|
+
const length = this.#chunkSampleCounts[i];
|
|
124
|
+
if (offset < length) {
|
|
125
|
+
this.read(this.#chunks[i], offset, this.#readBuffer);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
offset -= length;
|
|
39
129
|
}
|
|
40
|
-
|
|
130
|
+
this.#readBuffer.fill(0);
|
|
41
131
|
}
|
|
42
132
|
}
|
|
43
133
|
class Int16SourceProcessor extends SourceProcessor {
|
|
44
134
|
createSource(data) {
|
|
45
135
|
const source = new Int16Array(data[0]);
|
|
46
|
-
return [source, source.length /
|
|
136
|
+
return [source, source.length / this.channelCount];
|
|
137
|
+
}
|
|
138
|
+
read(source, offset, target) {
|
|
139
|
+
const sourceOffset = offset * this.channelCount;
|
|
140
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
141
|
+
target[i] = source[sourceOffset + i] / 0x8000;
|
|
142
|
+
}
|
|
47
143
|
}
|
|
48
|
-
copyChunk(
|
|
144
|
+
copyChunk(source, outputs, outputLength, outputIndex) {
|
|
49
145
|
const sourceLength = source.length;
|
|
50
|
-
let
|
|
51
|
-
while (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
146
|
+
let sourceIndex = 0;
|
|
147
|
+
while (sourceIndex < sourceLength) {
|
|
148
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
149
|
+
outputs[i][outputIndex] = source[sourceIndex] / 0x8000;
|
|
150
|
+
sourceIndex += 1;
|
|
151
|
+
}
|
|
56
152
|
outputIndex += 1;
|
|
57
153
|
if (outputIndex === outputLength) {
|
|
58
154
|
return [
|
|
59
|
-
|
|
60
|
-
? source.subarray(
|
|
155
|
+
sourceIndex < sourceLength
|
|
156
|
+
? source.subarray(sourceIndex)
|
|
61
157
|
: undefined,
|
|
62
|
-
sourceIndex,
|
|
158
|
+
sourceIndex / this.channelCount,
|
|
63
159
|
outputIndex,
|
|
64
160
|
];
|
|
65
161
|
}
|
|
66
162
|
}
|
|
67
|
-
return [undefined, sourceIndex, outputIndex];
|
|
163
|
+
return [undefined, sourceIndex / this.channelCount, outputIndex];
|
|
68
164
|
}
|
|
69
165
|
}
|
|
70
166
|
class Float32SourceProcessor extends SourceProcessor {
|
|
71
167
|
createSource(data) {
|
|
72
168
|
const source = new Float32Array(data[0]);
|
|
73
|
-
return [source, source.length /
|
|
169
|
+
return [source, source.length / this.channelCount];
|
|
170
|
+
}
|
|
171
|
+
read(source, offset, target) {
|
|
172
|
+
const sourceOffset = offset * this.channelCount;
|
|
173
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
174
|
+
target[i] = source[sourceOffset + i];
|
|
175
|
+
}
|
|
74
176
|
}
|
|
75
|
-
copyChunk(
|
|
177
|
+
copyChunk(source, outputs, outputLength, outputIndex) {
|
|
76
178
|
const sourceLength = source.length;
|
|
77
|
-
let
|
|
78
|
-
while (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
179
|
+
let sourceIndex = 0;
|
|
180
|
+
while (sourceIndex < sourceLength) {
|
|
181
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
182
|
+
outputs[i][outputIndex] = source[sourceIndex];
|
|
183
|
+
sourceIndex += 1;
|
|
184
|
+
}
|
|
83
185
|
outputIndex += 1;
|
|
84
186
|
if (outputIndex === outputLength) {
|
|
85
187
|
return [
|
|
86
|
-
|
|
87
|
-
? source.subarray(
|
|
188
|
+
sourceIndex < sourceLength
|
|
189
|
+
? source.subarray(sourceIndex)
|
|
88
190
|
: undefined,
|
|
89
|
-
sourceIndex,
|
|
191
|
+
sourceIndex / this.channelCount,
|
|
90
192
|
outputIndex,
|
|
91
193
|
];
|
|
92
194
|
}
|
|
93
195
|
}
|
|
94
|
-
return [undefined, sourceIndex, outputIndex];
|
|
196
|
+
return [undefined, sourceIndex / this.channelCount, outputIndex];
|
|
95
197
|
}
|
|
96
198
|
}
|
|
97
199
|
class Float32PlanerSourceProcessor extends SourceProcessor {
|
|
@@ -99,21 +201,24 @@ class Float32PlanerSourceProcessor extends SourceProcessor {
|
|
|
99
201
|
const source = data.map((channel) => new Float32Array(channel));
|
|
100
202
|
return [source, source[0].length];
|
|
101
203
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
204
|
+
read(source, offset, target) {
|
|
205
|
+
for (let i = 0; i < target.length; i += 1) {
|
|
206
|
+
target[i] = source[i][offset];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
copyChunk(source, outputs, outputLength, outputIndex) {
|
|
210
|
+
const sourceLength = source[0].length;
|
|
211
|
+
let sourceIndex = 0;
|
|
212
|
+
while (sourceIndex < sourceLength) {
|
|
213
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
214
|
+
outputs[i][outputIndex] = source[i][sourceIndex];
|
|
215
|
+
}
|
|
216
|
+
sourceIndex += 1;
|
|
112
217
|
outputIndex += 1;
|
|
113
218
|
if (outputIndex === outputLength) {
|
|
114
219
|
return [
|
|
115
|
-
|
|
116
|
-
? source.map((channel) => channel.subarray(
|
|
220
|
+
sourceIndex < sourceLength
|
|
221
|
+
? source.map((channel) => channel.subarray(sourceIndex))
|
|
117
222
|
: undefined,
|
|
118
223
|
sourceIndex,
|
|
119
224
|
outputIndex,
|
package/esm/worker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../worker/worker.ts"],"names":[],"mappings":"AAAA,MAAe,eACX,SAAQ,qBAAqB;IAG7B,
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../worker/worker.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,KAAK,GAAG,GAAG,CAAC;AAClB,MAAM,eAAe,GAAG,CAAC,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAErD,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,mBAAmB,GAAG,IAAI,YAAY,CAAC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C,SAAS;oBACf,WAAW;oBACX,WAAW;iBACd,CAAC;YACN,CAAC;QACL,CAAC;QAED,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC;CACJ;AAED,iBAAiB,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;AAClE,iBAAiB,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;AACtE,iBAAiB,CACb,iCAAiC,EACjC,4BAA4B,CAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/pcm-player",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Play raw audio sample stream using Web Audio API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"audio"
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"main": "esm/index.js",
|
|
25
25
|
"types": "esm/index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"tslib": "^2.6.
|
|
27
|
+
"tslib": "^2.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@jest/globals": "^
|
|
31
|
-
"@types/audioworklet": "^0.0.
|
|
30
|
+
"@jest/globals": "^30.0.0-alpha.3",
|
|
31
|
+
"@types/audioworklet": "^0.0.54",
|
|
32
32
|
"@yume-chan/eslint-config": "^1.0.0",
|
|
33
33
|
"@yume-chan/tsconfig": "^1.0.0",
|
|
34
34
|
"cross-env": "^7.0.3",
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"jest": "^
|
|
37
|
-
"prettier": "^3.
|
|
38
|
-
"ts-jest": "^29.1.
|
|
39
|
-
"typescript": "^5.
|
|
35
|
+
"eslint": "^8.57.0",
|
|
36
|
+
"jest": "^30.0.0-alpha.3",
|
|
37
|
+
"prettier": "^3.2.5",
|
|
38
|
+
"ts-jest": "^29.1.2",
|
|
39
|
+
"typescript": "^5.4.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -b tsconfig.dom.json && tsc -b tsconfig.worker.json",
|
package/src/index.ts
CHANGED
|
@@ -2,19 +2,26 @@ export abstract class PcmPlayer<T> {
|
|
|
2
2
|
protected abstract sourceName: string;
|
|
3
3
|
|
|
4
4
|
#context: AudioContext;
|
|
5
|
+
#channelCount: number;
|
|
5
6
|
#worklet: AudioWorkletNode | undefined;
|
|
6
7
|
#buffers: T[] = [];
|
|
8
|
+
#stopped = false;
|
|
7
9
|
|
|
8
|
-
constructor(sampleRate: number) {
|
|
10
|
+
constructor(sampleRate: number, channelCount: number) {
|
|
9
11
|
this.#context = new AudioContext({
|
|
10
12
|
latencyHint: "interactive",
|
|
11
13
|
sampleRate,
|
|
12
14
|
});
|
|
15
|
+
this.#channelCount = channelCount;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
protected abstract feedCore(worklet: AudioWorkletNode, source: T): void;
|
|
16
19
|
|
|
17
20
|
feed(source: T) {
|
|
21
|
+
if (this.#stopped) {
|
|
22
|
+
throw new Error("PcmPlayer is stopped");
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
if (this.#worklet === undefined) {
|
|
19
26
|
this.#buffers.push(source);
|
|
20
27
|
return;
|
|
@@ -28,10 +35,14 @@ export abstract class PcmPlayer<T> {
|
|
|
28
35
|
new URL("./worker.js", import.meta.url),
|
|
29
36
|
);
|
|
30
37
|
|
|
38
|
+
if (this.#stopped) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
31
42
|
this.#worklet = new AudioWorkletNode(this.#context, this.sourceName, {
|
|
32
43
|
numberOfInputs: 0,
|
|
33
44
|
numberOfOutputs: 1,
|
|
34
|
-
outputChannelCount: [
|
|
45
|
+
outputChannelCount: [this.#channelCount],
|
|
35
46
|
});
|
|
36
47
|
this.#worklet.connect(this.#context.destination);
|
|
37
48
|
|
|
@@ -42,6 +53,11 @@ export abstract class PcmPlayer<T> {
|
|
|
42
53
|
}
|
|
43
54
|
|
|
44
55
|
async stop() {
|
|
56
|
+
if (this.#stopped) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this.#stopped = true;
|
|
60
|
+
|
|
45
61
|
this.#worklet?.disconnect();
|
|
46
62
|
this.#worklet = undefined;
|
|
47
63
|
|
package/tsconfig.dom.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"extends": "./node_modules/@yume-chan/tsconfig/tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": [
|
|
5
|
+
"ESNext",
|
|
6
|
+
"DOM",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
9
|
+
"types": []
|
|
10
|
+
}
|
|
10
11
|
}
|
package/tsconfig.dom.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/modules/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","impliedFormat":1},{"version":"27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","impliedFormat":1},{"version":"eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec","impliedFormat":1},{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true,"impliedFormat":1},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true,"impliedFormat":1},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true,"impliedFormat":1},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true,"impliedFormat":1},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true,"impliedFormat":1},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true,"impliedFormat":1},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"3f8622deffd44e4cec506198021d210f7b1f7cbf491b53cc75fc034258faee1b","signature":"604a100f7437e561678fa215bd358d2b7dc011d14f88b3570b016ce950becd39","impliedFormat":99}],"root":[63],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[61],[62]],"referencedMap":[[62,1],[63,2]],"exportedModulesMap":[[62,1]],"semanticDiagnosticsPerFile":[62,61,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,63],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.1.6"}
|
|
1
|
+
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.dom.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/modules/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","impliedFormat":1},{"version":"886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94","impliedFormat":1},{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true,"impliedFormat":1},{"version":"76f838d5d49b65de83bc345c04aa54c62a3cfdb72a477dc0c0fce89a30596c30","affectsGlobalScope":true,"impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"ca76fcfb289a740b3259be2c82876ebc0b4806a22fc134c1e2ae3b7178f9d128","signature":"ce2bfa19f6205386857c2998560158dddd74ee3a69061d5316f182130c5fc47d","impliedFormat":99}],"root":[72],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[70],[71]],"referencedMap":[[71,1],[72,2]],"exportedModulesMap":[[71,1]],"semanticDiagnosticsPerFile":[71,70,68,69,12,13,15,14,2,16,17,18,19,20,21,22,23,3,24,4,25,29,26,27,28,30,31,32,5,33,34,35,36,6,40,37,38,39,41,7,42,47,48,43,44,45,46,8,52,49,50,51,53,9,54,55,56,59,57,58,60,61,10,1,62,11,66,64,63,67,65,72],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.4.2"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/modules/index.d.ts","./worker/worker.ts","../../common/temp/node_modules/.pnpm/@types+audioworklet@0.0.48/node_modules/@types/audioworklet/iterable.d.ts","../../common/temp/node_modules/.pnpm/@types+audioworklet@0.0.48/node_modules/@types/audioworklet/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","impliedFormat":1},{"version":"27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","impliedFormat":1},{"version":"eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec","impliedFormat":1},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true,"impliedFormat":1},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true,"impliedFormat":1},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true,"impliedFormat":1},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true,"impliedFormat":1},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true,"impliedFormat":1},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true,"impliedFormat":1},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"7b7c910815e083f6e75e7b7afd9f8fc5d1057502476f3d0284490102d2bee3a6","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"b38d0bfd2d1c1536d40fc5941fab5c5dd2749fb874fb57c451211ab806a3be8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdc987501e6fc28859e31e2630aede3825ef3159520619524279d36ec379791f","affectsGlobalScope":true,"impliedFormat":1}],"root":[62],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./worker","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[63],[60],[61]],"referencedMap":[[64,1],[61,2],[62,3]],"exportedModulesMap":[[64,1],[61,2]],"semanticDiagnosticsPerFile":[64,63,61,60,58,59,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,55,53,54,56,10,1,11,57,62],"latestChangedDtsFile":"./esm/worker.d.ts"},"version":"5.1.6"}
|
|
1
|
+
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/modules/index.d.ts","./worker/worker.ts","../../common/temp/node_modules/.pnpm/@types+audioworklet@0.0.54/node_modules/@types/audioworklet/iterable.d.ts","../../common/temp/node_modules/.pnpm/@types+audioworklet@0.0.54/node_modules/@types/audioworklet/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","impliedFormat":1},{"version":"886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94","impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"d4af5120a32af83dd6b4f2b06deb2d54508113a394dd6fcd78de658e5e4c7fc9","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"81b50607a33f27a06f7e718021f95751608715315c2bcd51c40881ff38a0c812","affectsGlobalScope":true,"impliedFormat":1},{"version":"bac59658eae5a92022080f5e386fdee9861578884acc06c5bb5ea10e3f53cac8","affectsGlobalScope":true,"impliedFormat":1}],"root":[70],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./worker","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[71],[68],[69]],"referencedMap":[[72,1],[69,2],[70,3]],"exportedModulesMap":[[72,1],[69,2]],"semanticDiagnosticsPerFile":[72,71,69,68,66,67,13,12,2,14,15,16,17,18,19,20,21,3,22,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,60,11,64,62,61,65,63,70],"latestChangedDtsFile":"./esm/worker.d.ts"},"version":"5.4.2"}
|
package/worker/worker.ts
CHANGED
|
@@ -1,80 +1,192 @@
|
|
|
1
|
+
const INPUT_HOP_SIZE = 3000;
|
|
2
|
+
const SCALE = 0.9;
|
|
3
|
+
const OUTPUT_HOP_SIZE = (INPUT_HOP_SIZE * SCALE) | 0;
|
|
4
|
+
|
|
5
|
+
const WINDOW_SIZE = 6000;
|
|
6
|
+
const WINDOW_WEIGHT_TABLE = new Float32Array(WINDOW_SIZE);
|
|
7
|
+
for (let i = 0; i < WINDOW_SIZE / 2; i += 1) {
|
|
8
|
+
const value = Math.sin((i / WINDOW_SIZE) * Math.PI);
|
|
9
|
+
WINDOW_WEIGHT_TABLE[i] = value;
|
|
10
|
+
WINDOW_WEIGHT_TABLE[WINDOW_SIZE - i - 1] = value;
|
|
11
|
+
}
|
|
12
|
+
|
|
1
13
|
abstract class SourceProcessor<T>
|
|
2
14
|
extends AudioWorkletProcessor
|
|
3
15
|
implements AudioWorkletProcessorImpl
|
|
4
16
|
{
|
|
5
|
-
|
|
6
|
-
#
|
|
17
|
+
channelCount: number;
|
|
18
|
+
#readBuffer: Float32Array;
|
|
19
|
+
|
|
20
|
+
#chunks: T[] = [];
|
|
21
|
+
#chunkSampleCounts: number[] = [];
|
|
22
|
+
#totalSampleCount = 0;
|
|
23
|
+
|
|
24
|
+
#starting = true;
|
|
25
|
+
#speedUp = false;
|
|
26
|
+
#readOffset = 0;
|
|
27
|
+
#inputOffset = 0;
|
|
28
|
+
#outputOffset = 0;
|
|
7
29
|
|
|
8
|
-
constructor() {
|
|
30
|
+
constructor(options: { outputChannelCount?: number[] }) {
|
|
9
31
|
super();
|
|
32
|
+
|
|
33
|
+
this.channelCount = options.outputChannelCount![0]!;
|
|
34
|
+
this.#readBuffer = new Float32Array(this.channelCount);
|
|
35
|
+
|
|
10
36
|
this.port.onmessage = (event) => {
|
|
37
|
+
while (this.#totalSampleCount > 0.35 * 48000) {
|
|
38
|
+
this.#chunks.shift();
|
|
39
|
+
const count = this.#chunkSampleCounts.shift()!;
|
|
40
|
+
this.#totalSampleCount -= count;
|
|
41
|
+
}
|
|
42
|
+
|
|
11
43
|
const data = event.data as ArrayBuffer[];
|
|
12
44
|
const [source, length] = this.createSource(data);
|
|
13
|
-
this.#
|
|
14
|
-
this.#
|
|
45
|
+
this.#chunks.push(source);
|
|
46
|
+
this.#chunkSampleCounts.push(length);
|
|
47
|
+
this.#totalSampleCount += length;
|
|
48
|
+
|
|
49
|
+
if (!this.#speedUp && this.#totalSampleCount > 0.25 * 48000) {
|
|
50
|
+
this.#speedUp = true;
|
|
51
|
+
this.#readOffset = 0;
|
|
52
|
+
this.#inputOffset = 0;
|
|
53
|
+
this.#outputOffset = 0;
|
|
54
|
+
}
|
|
15
55
|
};
|
|
16
56
|
}
|
|
17
57
|
|
|
18
58
|
protected abstract createSource(data: ArrayBuffer[]): [T, number];
|
|
19
59
|
|
|
20
|
-
process(_inputs: Float32Array[][], outputs: Float32Array[][]) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
60
|
+
process(_inputs: Float32Array[][], [outputs]: Float32Array[][]) {
|
|
61
|
+
if (this.#starting) {
|
|
62
|
+
if (this.#totalSampleCount < 0.1 * 48000) {
|
|
63
|
+
return true;
|
|
64
|
+
} else {
|
|
65
|
+
this.#starting = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
25
68
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
69
|
+
if (this.#speedUp && this.#totalSampleCount < 0.15 * 48000) {
|
|
70
|
+
this.#speedUp = false;
|
|
71
|
+
this.#starting = true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const outputLength = outputs![0]!.length;
|
|
75
|
+
|
|
76
|
+
if (this.#speedUp) {
|
|
77
|
+
for (let i = 0; i < outputLength; i += 1) {
|
|
78
|
+
let totalWeight = 0;
|
|
31
79
|
|
|
32
|
-
|
|
33
|
-
|
|
80
|
+
const firstWindow = Math.max(
|
|
81
|
+
0,
|
|
82
|
+
Math.floor(
|
|
83
|
+
(this.#outputOffset - WINDOW_SIZE) / OUTPUT_HOP_SIZE,
|
|
84
|
+
) + 1,
|
|
85
|
+
);
|
|
34
86
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
87
|
+
let inWindowIndex =
|
|
88
|
+
this.#outputOffset - firstWindow * OUTPUT_HOP_SIZE;
|
|
89
|
+
let inputIndex = firstWindow * INPUT_HOP_SIZE + inWindowIndex;
|
|
90
|
+
|
|
91
|
+
while (inputIndex > 0 && inWindowIndex >= 0) {
|
|
92
|
+
this.#read(inputIndex - this.#readOffset);
|
|
93
|
+
const weight = WINDOW_WEIGHT_TABLE[inWindowIndex]!;
|
|
94
|
+
for (let j = 0; j < this.channelCount; j += 1) {
|
|
95
|
+
outputs![j]![i] += this.#readBuffer[j]! * weight;
|
|
96
|
+
}
|
|
97
|
+
totalWeight += weight;
|
|
98
|
+
|
|
99
|
+
inputIndex += INPUT_HOP_SIZE - OUTPUT_HOP_SIZE;
|
|
100
|
+
inWindowIndex -= OUTPUT_HOP_SIZE;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (totalWeight > 0) {
|
|
104
|
+
for (let j = 0; j < this.channelCount; j += 1) {
|
|
105
|
+
outputs![j]![i] /= totalWeight;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
this.#outputOffset += 1;
|
|
110
|
+
if (firstWindow > 0) {
|
|
111
|
+
this.#outputOffset -= OUTPUT_HOP_SIZE;
|
|
112
|
+
this.#readOffset -= INPUT_HOP_SIZE;
|
|
113
|
+
this.#inputOffset += (1 - SCALE) * INPUT_HOP_SIZE;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
this.#inputOffset += outputLength;
|
|
118
|
+
const firstChunkSampleCount = this.#chunkSampleCounts[0]!;
|
|
119
|
+
if (
|
|
120
|
+
firstChunkSampleCount !== undefined &&
|
|
121
|
+
this.#inputOffset >= firstChunkSampleCount
|
|
122
|
+
) {
|
|
123
|
+
this.#chunks.shift();
|
|
124
|
+
this.#chunkSampleCounts.shift();
|
|
125
|
+
this.#totalSampleCount -= firstChunkSampleCount;
|
|
126
|
+
this.#readOffset += firstChunkSampleCount;
|
|
127
|
+
this.#inputOffset -= firstChunkSampleCount;
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
this.#copyChunks(outputs!);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#copyChunks(outputs: Float32Array[]) {
|
|
137
|
+
let outputIndex = 0;
|
|
138
|
+
const outputLength = outputs[0]!.length;
|
|
139
|
+
|
|
140
|
+
while (this.#chunks.length > 0 && outputIndex < outputLength) {
|
|
141
|
+
let source: T | undefined = this.#chunks[0];
|
|
142
|
+
let consumedSampleCount = 0;
|
|
143
|
+
[source, consumedSampleCount, outputIndex] = this.copyChunk(
|
|
39
144
|
source!,
|
|
40
|
-
|
|
41
|
-
outputRight,
|
|
145
|
+
outputs,
|
|
42
146
|
outputLength,
|
|
43
|
-
outputIndex
|
|
147
|
+
outputIndex,
|
|
44
148
|
);
|
|
45
149
|
|
|
46
|
-
|
|
47
|
-
this.#sourceSampleCount -= consumedSampleCount;
|
|
48
|
-
sourceIndex -= consumedSampleCount;
|
|
150
|
+
this.#totalSampleCount -= consumedSampleCount;
|
|
49
151
|
|
|
50
152
|
if (source) {
|
|
51
153
|
// Output full
|
|
52
|
-
this.#
|
|
53
|
-
|
|
154
|
+
this.#chunks[0] = source;
|
|
155
|
+
this.#chunkSampleCounts[0]! -= consumedSampleCount;
|
|
156
|
+
return;
|
|
54
157
|
}
|
|
55
158
|
|
|
56
|
-
this.#
|
|
159
|
+
this.#chunks.shift();
|
|
160
|
+
this.#chunkSampleCounts.shift();
|
|
57
161
|
}
|
|
162
|
+
}
|
|
58
163
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
164
|
+
#read(offset: number) {
|
|
165
|
+
for (let i = 0; i < this.#chunks.length; i += 1) {
|
|
166
|
+
const length = this.#chunkSampleCounts[i]!;
|
|
167
|
+
|
|
168
|
+
if (offset < length) {
|
|
169
|
+
this.read(this.#chunks[i]!, offset, this.#readBuffer);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
offset -= length;
|
|
65
174
|
}
|
|
66
175
|
|
|
67
|
-
|
|
176
|
+
this.#readBuffer.fill(0);
|
|
68
177
|
}
|
|
69
178
|
|
|
179
|
+
protected abstract read(
|
|
180
|
+
source: T,
|
|
181
|
+
offset: number,
|
|
182
|
+
target: Float32Array,
|
|
183
|
+
): void;
|
|
184
|
+
|
|
70
185
|
protected abstract copyChunk(
|
|
71
|
-
sourceIndex: number,
|
|
72
|
-
sourceIndexStep: number,
|
|
73
186
|
source: T,
|
|
74
|
-
|
|
75
|
-
outputRight: Float32Array,
|
|
187
|
+
outputs: Float32Array[],
|
|
76
188
|
outputLength: number,
|
|
77
|
-
outputIndex: number
|
|
189
|
+
outputIndex: number,
|
|
78
190
|
): [source: T | undefined, sourceIndex: number, outputIndex: number];
|
|
79
191
|
}
|
|
80
192
|
|
|
@@ -84,135 +196,151 @@ class Int16SourceProcessor
|
|
|
84
196
|
{
|
|
85
197
|
protected override createSource(data: ArrayBuffer[]): [Int16Array, number] {
|
|
86
198
|
const source = new Int16Array(data[0]!);
|
|
87
|
-
return [source, source.length /
|
|
199
|
+
return [source, source.length / this.channelCount];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
protected override read(
|
|
203
|
+
source: Int16Array,
|
|
204
|
+
offset: number,
|
|
205
|
+
target: Float32Array,
|
|
206
|
+
) {
|
|
207
|
+
const sourceOffset = offset * this.channelCount;
|
|
208
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
209
|
+
target[i] = source[sourceOffset + i]! / 0x8000;
|
|
210
|
+
}
|
|
88
211
|
}
|
|
89
212
|
|
|
90
213
|
protected override copyChunk(
|
|
91
|
-
sourceIndex: number,
|
|
92
|
-
sourceIndexStep: number,
|
|
93
214
|
source: Int16Array,
|
|
94
|
-
|
|
95
|
-
outputRight: Float32Array,
|
|
215
|
+
outputs: Float32Array[],
|
|
96
216
|
outputLength: number,
|
|
97
|
-
outputIndex: number
|
|
217
|
+
outputIndex: number,
|
|
98
218
|
): [
|
|
99
219
|
source: Int16Array | undefined,
|
|
100
220
|
sourceIndex: number,
|
|
101
221
|
outputIndex: number,
|
|
102
222
|
] {
|
|
103
223
|
const sourceLength = source.length;
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
while (sourceSampleIndex < sourceLength) {
|
|
107
|
-
outputLeft[outputIndex] = source[sourceSampleIndex]! / 0x8000;
|
|
108
|
-
outputRight[outputIndex] = source[sourceSampleIndex + 1]! / 0x8000;
|
|
224
|
+
let sourceIndex = 0;
|
|
109
225
|
|
|
110
|
-
|
|
111
|
-
|
|
226
|
+
while (sourceIndex < sourceLength) {
|
|
227
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
228
|
+
outputs[i]![outputIndex] = source[sourceIndex]! / 0x8000;
|
|
229
|
+
sourceIndex += 1;
|
|
230
|
+
}
|
|
112
231
|
outputIndex += 1;
|
|
113
232
|
|
|
114
233
|
if (outputIndex === outputLength) {
|
|
115
234
|
return [
|
|
116
|
-
|
|
117
|
-
? source.subarray(
|
|
235
|
+
sourceIndex < sourceLength
|
|
236
|
+
? source.subarray(sourceIndex)
|
|
118
237
|
: undefined,
|
|
119
|
-
sourceIndex,
|
|
238
|
+
sourceIndex / this.channelCount,
|
|
120
239
|
outputIndex,
|
|
121
240
|
];
|
|
122
241
|
}
|
|
123
242
|
}
|
|
124
243
|
|
|
125
|
-
return [undefined, sourceIndex, outputIndex];
|
|
244
|
+
return [undefined, sourceIndex / this.channelCount, outputIndex];
|
|
126
245
|
}
|
|
127
246
|
}
|
|
128
247
|
|
|
129
248
|
class Float32SourceProcessor extends SourceProcessor<Float32Array> {
|
|
130
249
|
protected override createSource(
|
|
131
|
-
data: ArrayBuffer[]
|
|
250
|
+
data: ArrayBuffer[],
|
|
132
251
|
): [Float32Array, number] {
|
|
133
252
|
const source = new Float32Array(data[0]!);
|
|
134
|
-
return [source, source.length /
|
|
253
|
+
return [source, source.length / this.channelCount];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
protected override read(
|
|
257
|
+
source: Float32Array,
|
|
258
|
+
offset: number,
|
|
259
|
+
target: Float32Array,
|
|
260
|
+
) {
|
|
261
|
+
const sourceOffset = offset * this.channelCount;
|
|
262
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
263
|
+
target[i] = source[sourceOffset + i]!;
|
|
264
|
+
}
|
|
135
265
|
}
|
|
136
266
|
|
|
137
267
|
protected override copyChunk(
|
|
138
|
-
sourceIndex: number,
|
|
139
|
-
sourceIndexStep: number,
|
|
140
268
|
source: Float32Array,
|
|
141
|
-
|
|
142
|
-
outputRight: Float32Array,
|
|
269
|
+
outputs: Float32Array[],
|
|
143
270
|
outputLength: number,
|
|
144
|
-
outputIndex: number
|
|
271
|
+
outputIndex: number,
|
|
145
272
|
): [
|
|
146
273
|
source: Float32Array | undefined,
|
|
147
274
|
sourceIndex: number,
|
|
148
275
|
outputIndex: number,
|
|
149
276
|
] {
|
|
150
277
|
const sourceLength = source.length;
|
|
151
|
-
let
|
|
152
|
-
|
|
153
|
-
while (sourceSampleIndex < sourceLength) {
|
|
154
|
-
outputLeft[outputIndex] = source[sourceSampleIndex]!;
|
|
155
|
-
outputRight[outputIndex] = source[sourceSampleIndex + 1]!;
|
|
278
|
+
let sourceIndex = 0;
|
|
156
279
|
|
|
157
|
-
|
|
158
|
-
|
|
280
|
+
while (sourceIndex < sourceLength) {
|
|
281
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
282
|
+
outputs[i]![outputIndex] = source[sourceIndex]!;
|
|
283
|
+
sourceIndex += 1;
|
|
284
|
+
}
|
|
159
285
|
outputIndex += 1;
|
|
160
286
|
|
|
161
287
|
if (outputIndex === outputLength) {
|
|
162
288
|
return [
|
|
163
|
-
|
|
164
|
-
? source.subarray(
|
|
289
|
+
sourceIndex < sourceLength
|
|
290
|
+
? source.subarray(sourceIndex)
|
|
165
291
|
: undefined,
|
|
166
|
-
sourceIndex,
|
|
292
|
+
sourceIndex / this.channelCount,
|
|
167
293
|
outputIndex,
|
|
168
294
|
];
|
|
169
295
|
}
|
|
170
296
|
}
|
|
171
297
|
|
|
172
|
-
return [undefined, sourceIndex, outputIndex];
|
|
298
|
+
return [undefined, sourceIndex / this.channelCount, outputIndex];
|
|
173
299
|
}
|
|
174
300
|
}
|
|
175
301
|
|
|
176
302
|
class Float32PlanerSourceProcessor extends SourceProcessor<Float32Array[]> {
|
|
177
303
|
protected override createSource(
|
|
178
|
-
data: ArrayBuffer[]
|
|
304
|
+
data: ArrayBuffer[],
|
|
179
305
|
): [Float32Array[], number] {
|
|
180
306
|
const source = data.map((channel) => new Float32Array(channel));
|
|
181
307
|
return [source, source[0]!.length];
|
|
182
308
|
}
|
|
183
309
|
|
|
310
|
+
protected override read(
|
|
311
|
+
source: Float32Array[],
|
|
312
|
+
offset: number,
|
|
313
|
+
target: Float32Array,
|
|
314
|
+
) {
|
|
315
|
+
for (let i = 0; i < target.length; i += 1) {
|
|
316
|
+
target[i] = source[i]![offset]!;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
184
320
|
protected override copyChunk(
|
|
185
|
-
sourceIndex: number,
|
|
186
|
-
sourceIndexStep: number,
|
|
187
321
|
source: Float32Array[],
|
|
188
|
-
|
|
189
|
-
outputRight: Float32Array,
|
|
322
|
+
outputs: Float32Array[],
|
|
190
323
|
outputLength: number,
|
|
191
|
-
outputIndex: number
|
|
324
|
+
outputIndex: number,
|
|
192
325
|
): [
|
|
193
326
|
source: Float32Array[] | undefined,
|
|
194
327
|
sourceIndex: number,
|
|
195
328
|
outputIndex: number,
|
|
196
329
|
] {
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
const sourceLength = sourceLeft.length;
|
|
200
|
-
let sourceSampleIndex = sourceIndex | 0;
|
|
201
|
-
|
|
202
|
-
while (sourceSampleIndex < sourceLength) {
|
|
203
|
-
outputLeft[outputIndex] = sourceLeft[sourceSampleIndex]!;
|
|
204
|
-
outputRight[outputIndex] = sourceRight[sourceSampleIndex]!;
|
|
330
|
+
const sourceLength = source[0]!.length;
|
|
331
|
+
let sourceIndex = 0;
|
|
205
332
|
|
|
206
|
-
|
|
207
|
-
|
|
333
|
+
while (sourceIndex < sourceLength) {
|
|
334
|
+
for (let i = 0; i < this.channelCount; i += 1) {
|
|
335
|
+
outputs[i]![outputIndex] = source[i]![sourceIndex]!;
|
|
336
|
+
}
|
|
337
|
+
sourceIndex += 1;
|
|
208
338
|
outputIndex += 1;
|
|
209
339
|
|
|
210
340
|
if (outputIndex === outputLength) {
|
|
211
341
|
return [
|
|
212
|
-
|
|
213
|
-
? source.map((channel) =>
|
|
214
|
-
channel.subarray(sourceSampleIndex)
|
|
215
|
-
)
|
|
342
|
+
sourceIndex < sourceLength
|
|
343
|
+
? source.map((channel) => channel.subarray(sourceIndex))
|
|
216
344
|
: undefined,
|
|
217
345
|
sourceIndex,
|
|
218
346
|
outputIndex,
|
|
@@ -228,5 +356,5 @@ registerProcessor("int16-source-processor", Int16SourceProcessor);
|
|
|
228
356
|
registerProcessor("float32-source-processor", Float32SourceProcessor);
|
|
229
357
|
registerProcessor(
|
|
230
358
|
"float32-planer-source-processor",
|
|
231
|
-
Float32PlanerSourceProcessor
|
|
359
|
+
Float32PlanerSourceProcessor,
|
|
232
360
|
);
|