fix record all call does not work on wav format (#211)

* fix #210

* fix throw error without new

* fix throw error without new
This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2023-08-01 07:53:58 -04:00
1 parent f3d002cfca
commit d361f1aeb1
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ async function upload(logger, socket) {
/**encoder */
let encoder;
if (obj.record_format === 'wav') {
if (account[0].record_format === 'wav') {
encoder = new wav.Writer({ channels: 2, sampleRate, bitDepth: 16 });
} else {
// default is mp3