unknown fix #4

This commit is contained in:
xdrm-brackets 2018-04-06 01:24:42 +02:00
parent 9bd0d8c0c9
commit 1d7837b6dc
1 changed files with 3 additions and 4 deletions

View File

@ -55,7 +55,6 @@ export default class AudioManager{
/* (10) Manage websocket responses */
var self = this;
this.ws.onmessage = function(_msg){
console.warn(`received`, _msg.data);
@ -65,9 +64,9 @@ export default class AudioManager{
let fr = new FileReader();
fr.onload = function(){
let buf16 = new Int16Array(this.result);
self.receive(buf16).bind(self);
};
let buf16 = new Int16Array(fr.result);
this.receive(buf16).bind(this);
}.bind(this);
fr.readAsArrayBuffer(_msg.data);