Make sure the sampling rate is 44100Hz

This commit is contained in:
Stefano Brilli 2020-03-23 19:16:46 +01:00
parent 3fec73d556
commit f15e4970d8
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ export class FFMpegAudioExportService implements AudioExportService {
async export({ format }: { format: string }) { async export({ format }: { format: string }) {
if (format === `SP`) { if (format === `SP`) {
const outFileName = `${this.outFileNameNoExt}.raw`; const outFileName = `${this.outFileNameNoExt}.raw`;
await this.ffmpegProcess.transcode(this.inFileName, outFileName, '-f s16be'); await this.ffmpegProcess.transcode(this.inFileName, outFileName, '-f s16be -ar 44100');
let { data } = await this.ffmpegProcess.read(outFileName); let { data } = await this.ffmpegProcess.read(outFileName);
return data.buffer; return data.buffer;
} else { } else {