audiocogs/aurora.js — pull request #32 by fsbdev (2013-08-25 00:07:06+00:00)
Title: Suggestion: WebSocket source component.

Here I've added a new class alongside the FileReader and XHR source class files.
It conforms to the existing API for source classes and uses WebSockets to communicate with a server and receive a stream of audio.

A server implementation with the required API in Node.js can be seen here: https://gist.github.com/fsbdev/6277584
I may turn that code into its own module or we could even integrate it into the Aurora codebase.

This pull request is to establish a place for feedback on the idea and implementation so that I can improve it and hopefully integrate it into the Aurora repository.

I've used it to stream MP3 and FLAC audio in Chrome. There is a delay of several seconds (using a local server) in beginning the playing of FLAC data - I realised it doesn't seem to play the file until it has received the whole file? (Not just FLAC I think but that's when it's noticeable.)