unknown fix #3
This commit is contained in:
parent
6d42d2ec21
commit
9bd0d8c0c9
|
@ -55,6 +55,7 @@ export default class AudioManager{
|
||||||
|
|
||||||
|
|
||||||
/* (10) Manage websocket responses */
|
/* (10) Manage websocket responses */
|
||||||
|
var self = this;
|
||||||
this.ws.onmessage = function(_msg){
|
this.ws.onmessage = function(_msg){
|
||||||
console.warn(`received`, _msg.data);
|
console.warn(`received`, _msg.data);
|
||||||
|
|
||||||
|
@ -64,9 +65,9 @@ export default class AudioManager{
|
||||||
let fr = new FileReader();
|
let fr = new FileReader();
|
||||||
|
|
||||||
fr.onload = function(){
|
fr.onload = function(){
|
||||||
let buf16 = new Int16Array(fr.result);
|
let buf16 = new Int16Array(this.result);
|
||||||
this.receive(buf16).bind(this);
|
self.receive(buf16).bind(self);
|
||||||
}.bind(this);
|
};
|
||||||
|
|
||||||
fr.readAsArrayBuffer(_msg.data);
|
fr.readAsArrayBuffer(_msg.data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue