Some changes/improvements
Kjos opened this issue · 1 comments
Hi, you're library helped me out getting audio to work on my websocket desktopstreamer.
I made some alterations you might consider implementing.
See my own version here:
https://github.com/Kjos/OculusGoStreamer/blob/master/website/pcm-player.js
Since I use websockets I parse the msg.data as Int8Array immediately, leaving out the conversion afterwards. Also I use a BufferSource as actual buffer, no tmp array. This saves another iterated copy.
I removed the interval method and act only on feed() call.
It runs almost fine on mobile, although I get some noise which I'm not sure comes from my audio output or not.
Last thing, I think there might be something to gain from slowing the plackbackRate slightly, my reasoning being there might be less seams, but thats just a theory.
ok, will it support encoding 32bitFloat ?