Fix: 导出文件也改成 16 Bit PCM 格式的测试看下
This commit is contained in:
parent
ce8514cc39
commit
a7a1496ca2
|
|
@ -31,11 +31,11 @@ const onDownload = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = getMergedPCMData(buffers);
|
const data = getMergedPCMData(buffers);
|
||||||
const blob = new Blob([data.buffer], { type: 'audio/wave' });
|
const blob = new Blob([floatTo16BitPCM(data)], { type: 'audio/wave' });
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = URL.createObjectURL(blob);
|
a.href = URL.createObjectURL(blob);
|
||||||
a.download = 'merged_audio.wav';
|
a.download = 'merged_audio.pcm';
|
||||||
a.click();
|
a.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue