From 1d7837b6dc4d46f7e0a1571f2c581ecb8a48f5c7 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 Apr 2018 01:24:42 +0200 Subject: [PATCH] unknown fix #4 --- webpack/lib/audio-manager.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webpack/lib/audio-manager.js b/webpack/lib/audio-manager.js index b0ab65f..e5e56db 100644 --- a/webpack/lib/audio-manager.js +++ b/webpack/lib/audio-manager.js @@ -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);