From b2446386d1490508ed0a20a64bf39cc4f897ae6b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 Apr 2018 02:21:27 +0200 Subject: [PATCH] decreased frame time window + removed debug --- webpack/lib/audio-manager.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/webpack/lib/audio-manager.js b/webpack/lib/audio-manager.js index d27a784..967386b 100644 --- a/webpack/lib/audio-manager.js +++ b/webpack/lib/audio-manager.js @@ -1,6 +1,6 @@ export default class AudioManager{ - static get BUFFER_SIZE(){ return 16384; } + static get BUFFER_SIZE(){ return 8192; } constructor(){ @@ -99,16 +99,12 @@ export default class AudioManager{ let buf16 = this.f32toi16(buf32); - if( this.ws && this.ws.readyState === 1 ) console.log(`send buffer[${buf16.length}]`); - else console.log(`websocket not connected`); - this.ws && this.ws.send(buf16); + this.ws.send(buf16); } receive(_buffer){ - console.log(`play buffer[${_buffer.length}]`); - /* (1) Convert to Float32Array */ let buf32 = this.i16tof32(_buffer);