Fix: 导出文件也改成 16 Bit PCM 格式的测试看下

This commit is contained in:
Paul 2024-06-04 11:32:03 +08:00
parent ce8514cc39
commit a7a1496ca2
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}; };