Skip to content

Commit cb9674f

Browse files
committed
fix on chrome 109
1 parent e03207e commit cb9674f

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spessasynth_lib",
3-
"version": "4.2.10",
3+
"version": "4.2.11",
44
"description": "MIDI and SoundFont2/DLS library for the browsers with no compromises",
55
"type": "module",
66
"main": "dist/index.js",

src/worklet_processor.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import type { PassedProcessorParameters } from "./synthesizer/types.ts";
55
import { WorkletSynthesizerCore } from "./synthesizer/worklet/worklet_synthesizer_core.ts";
66

77
class WorkletSynthesizerProcessor extends AudioWorkletProcessor {
8-
public readonly process: (
9-
inputs: Float32Array[][],
10-
outputs: Float32Array[][],
11-
parameters: Record<string, Float32Array>
12-
) => boolean;
138
private readonly core: WorkletSynthesizerCore;
149

1510
public constructor(options: {
@@ -22,7 +17,11 @@ class WorkletSynthesizerProcessor extends AudioWorkletProcessor {
2217
this.port,
2318
options.processorOptions
2419
);
25-
this.process = this.core.process.bind(this.core);
20+
}
21+
22+
// Don't bind, do it like this for it to work with chrome 109
23+
public process(inputs: Float32Array[][], outputs: Float32Array[][]) {
24+
return this.core.process(inputs, outputs);
2625
}
2726
}
2827

0 commit comments

Comments
 (0)