unknown fix #3

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

View File

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