nkzawa / socket.io-stream

Stream for Socket.IO
MIT License
611 stars 113 forks source link

How to build a stream with JavaScript Array #57

Open guicontat opened 9 years ago

guicontat commented 9 years ago

Hello everybody,

I have to build a web app in order to send the voice of my boss to all users who are connected to the society's website.

I am using NodeJS for my server, and Node-Core-Audio in order to get the sound of my soundcard (a microphone is connected to the computer where Node-Core-Audio is installed. So i'm able to send a JavaScript Array with 1024 audio samples to my NodeJS server

Node-Core-Audio (with NodeJs) --------------> NodeJS Server |---------------------> Users (AngularJS)

I'm using socket.io to transport the sound, but it's not perfect, i've got some latency periods.

I'm reading about socket.io-stream but it seems that it is only used to send files ?

How can I build a socket.io-stream which send all my arrays filled with 1024 audio samples ?

joshterrill commented 9 years ago

I'm trying to create something similar that will allow me to send a files contents to people connected on the website but I keep running into maximum call stack size exceeded errors. I don't mean to hijack your thread but could you maybe email me and show me how you're sending it in the first place?