mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
chore: update dependencies
This commit is contained in:
parent
01f812ea97
commit
7ad568d1b5
19 changed files with 256 additions and 257 deletions
|
@ -30,7 +30,7 @@
|
|||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/audioworklet": "^0.0.65",
|
||||
"@types/audioworklet": "^0.0.67",
|
||||
"@yume-chan/eslint-config": "workspace:^",
|
||||
"@yume-chan/tsconfig": "workspace:^",
|
||||
"prettier": "^3.4.2",
|
||||
|
|
|
@ -33,15 +33,13 @@ abstract class SourceProcessor<T>
|
|||
this.channelCount = options.outputChannelCount![0]!;
|
||||
this.#readBuffer = new Float32Array(this.channelCount);
|
||||
|
||||
this.port.onmessage = (event) => {
|
||||
this.port.onmessage = ({ data }: MessageEvent<ArrayBuffer[]>) => {
|
||||
while (this.#totalSampleCount > 0.35 * 48000) {
|
||||
this.#chunks.shift();
|
||||
const count = this.#chunkSampleCounts.shift()!;
|
||||
this.#totalSampleCount -= count;
|
||||
}
|
||||
|
||||
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1860
|
||||
const { data } = event as MessageEvent<ArrayBuffer[]>;
|
||||
const [source, length] = this.createSource(data);
|
||||
this.#chunks.push(source);
|
||||
this.#chunkSampleCounts.push(length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue