decreased frame time window + removed debug

This commit is contained in:
xdrm-brackets 2018-04-06 02:21:27 +02:00
parent f6b17ccbd2
commit b2446386d1
1 changed files with 2 additions and 6 deletions

View File

@ -1,6 +1,6 @@
export default class AudioManager{ export default class AudioManager{
static get BUFFER_SIZE(){ return 16384; } static get BUFFER_SIZE(){ return 8192; }
constructor(){ constructor(){
@ -99,16 +99,12 @@ export default class AudioManager{
let buf16 = this.f32toi16(buf32); let buf16 = this.f32toi16(buf32);
if( this.ws && this.ws.readyState === 1 ) console.log(`send buffer[${buf16.length}]`); this.ws.send(buf16);
else console.log(`websocket not connected`);
this.ws && this.ws.send(buf16);
} }
receive(_buffer){ receive(_buffer){
console.log(`play buffer[${_buffer.length}]`);
/* (1) Convert to Float32Array */ /* (1) Convert to Float32Array */
let buf32 = this.i16tof32(_buffer); let buf32 = this.i16tof32(_buffer);