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);