decreased frame time window + removed debug
This commit is contained in:
parent
f6b17ccbd2
commit
b2446386d1
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue