From 0147d77802ee91528b03478bd9d08fb46ead2aaf Mon Sep 17 00:00:00 2001 From: thelamer Date: Tue, 28 Feb 2023 10:00:06 -0800 Subject: [PATCH] stop converting buffer to array server side --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 07889cf..a15def8 100644 --- a/index.js +++ b/index.js @@ -147,8 +147,7 @@ aio.on('connection', function (socket) { record.on('connection', function(){ record.on('data', function(chunk) { // Only send real audio data - let arr = chunk.toJSON().data; - if (arr.length < 26456) { + if (chunk.length < 26456) { aio.sockets.to(id).emit('audio', chunk); } });