unknown fix #4
This commit is contained in:
parent
9bd0d8c0c9
commit
1d7837b6dc
|
@ -55,7 +55,6 @@ 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);
|
||||||
|
|
||||||
|
@ -65,9 +64,9 @@ export default class AudioManager{
|
||||||
let fr = new FileReader();
|
let fr = new FileReader();
|
||||||
|
|
||||||
fr.onload = function(){
|
fr.onload = function(){
|
||||||
let buf16 = new Int16Array(this.result);
|
let buf16 = new Int16Array(fr.result);
|
||||||
self.receive(buf16).bind(self);
|
this.receive(buf16).bind(this);
|
||||||
};
|
}.bind(this);
|
||||||
|
|
||||||
fr.readAsArrayBuffer(_msg.data);
|
fr.readAsArrayBuffer(_msg.data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue