Skip to content

Commit 165bc69

Browse files
committed
fix melspectrogram build issues
1 parent a3f4911 commit 165bc69

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

examples/demos/melspectrogram-rt/MelSpectrogram.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const rmsText = ref("-100");
3737
let melspectrogramNode;
3838
let analyserNode;
3939
let melspectrumBuffer;
40-
const melspectogramProcessorName = melspectrogramProcessorURL.split("/").at(-1).split(".")[0];
40+
const melspectogramProcessorName = "melspectrogram-processor";
4141
let rmsAnalyser;
4242
4343
const fontColor = "#6c6c6c";

examples/demos/melspectrogram-rt/RMSAnalyser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class RMSAnalyser {
3737
this.essentiaNode;
3838
this.animationID;
3939

40-
this.processorName = processorUrl.split("/").at(-1).split(".")[0];
40+
this.processorName = "rms-processor";
4141
}
4242

4343
async registerNode() {

examples/vite.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ export default defineConfig({
4444
publicDir: '../public',
4545
optimizeDeps: {
4646
exclude: ["playground-elements"]
47-
}
47+
},
48+
build: {
49+
assetsInlineLimit: (filepath, content) => {
50+
if (filepath.includes('processor.js')) {
51+
return false; // 1MB
52+
}
53+
return undefined; // default 4kb
54+
}
55+
},
4856
// assetsInclude: ["**/*.wasm"]
4957
})

0 commit comments

Comments
 (0)