fix shitty scope
This commit is contained in:
parent
1d7837b6dc
commit
5ed03574a7
|
@ -37,8 +37,10 @@ export default class AudioManager{
|
|||
this._ws = {
|
||||
stack: [],
|
||||
send: function(_data){
|
||||
if( this.ws.readyState !== 1 ) // not connected -> stack
|
||||
if( this.ws.readyState !== 1 ){ // not connected -> stack
|
||||
console.warn(`push stack`);
|
||||
return this._ws.stack.push(_data);
|
||||
}
|
||||
|
||||
console.warn(`send buffer[${_data.length}]`);
|
||||
this.ws.send(_data);
|
||||
|
@ -65,7 +67,8 @@ export default class AudioManager{
|
|||
|
||||
fr.onload = function(){
|
||||
let buf16 = new Int16Array(fr.result);
|
||||
this.receive(buf16).bind(this);
|
||||
this.receive(buf16);
|
||||
|
||||
}.bind(this);
|
||||
|
||||
fr.readAsArrayBuffer(_msg.data);
|
||||
|
|
Loading…
Reference in New Issue