fix deprecated Buffer() call

This commit is contained in:
Alexandre Storelli 2019-03-13 11:02:01 +01:00
parent 8799b717d8
commit 0b76231185
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ process.on('message', function(msg) {
assert(msg.buf);
assert.equal(msg.buf.type, 'Buffer'); // JSON.stringify represents Buffers as { type: 'Buffer', data: '' }
newBuf = newBuf ? Buffer.concat([newBuf, new Buffer(msg.buf.data)]) : new Buffer(msg.buf.data);
newBuf = newBuf ? Buffer.concat([newBuf, Buffer.from(msg.buf.data)]) : Buffer.from(msg.buf.data);
//log.debug("write " + buf.length / 2 + " samples to the buffer. now " + newBuf.length / 2 + " samples in it");