web-audio-workers-sockets
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "web-audio-workers-sockets", | ||
"version": "1.2.1", | ||
"description": "stream audio using web sockets in web worker rendered using web audio", | ||
"version": "1.2.2", | ||
"description": "DECOMMISSIONED - see this body of work continued at https://www.npmjs.com/package/websockets-streaming-audio", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
web-audio-workers-sockets | ||
========================= | ||
stream audio using web sockets in web worker rendered using web audio | ||
D E C O M M I S S I O N E D | ||
The goal is to stream audio from server to browser to be rendered using web audio. | ||
Without using webworkers, my experience is the audio gets choppy when the single thread | ||
of the browser is used for everything (streaming sockets / audio rendering) | ||
I am progressing this project at | ||
I have discovered firefox fails to allow websockets from inside a webworker, yet | ||
this is OK on chrome. Also, no browser supports web audio from a webworker. | ||
So I will see if I can eliminate this choppy audio issue by creating a sandwich : | ||
websocket <--> webworker <--> webaudio | ||
https://www.npmjs.com/package/websockets-streaming-audio | ||
... but first I will attempt to get a smooth audio rendering using just websockets + web audio | ||
# Installation | ||
Dependencies include node/npm | ||
```bash | ||
npm install -g web-audio-workers-sockets | ||
cd $NODE_PATH/web-audio-workers-sockets | ||
npm start | ||
``` | ||
... or if you prefer to have the git repo local : | ||
```bash | ||
git clone git@github.com:scottstensland/web-audio-workers-sockets.git | ||
cd web-audio-workers-sockets | ||
npm install # install the dependent modules | ||
npm start | ||
``` | ||
Using a web audio/web worker/websocket savvy browser, point it at URL : | ||
```bash | ||
http://localhost:8888 | ||
``` | ||
As of today - August 26th 2014 - only chrome works on linux, firefox (34.0a1 (2014-08-04)) fails since it cannot yet handle launching a websocket from a webworker thread. Opera also fails on lack of web audio. | ||
D E C O M M I S S I O N E D |
@@ -23,2 +23,4 @@ | ||
console.log("about to send to worker msg ... ", curr_msg); | ||
worker.postMessage(curr_msg); | ||
@@ -25,0 +27,0 @@ } |
@@ -1180,10 +1180,7 @@ | ||
// console.log("final_index ", final_index); | ||
// console.log("curr_index_synth_buffer ", curr_index_synth_buffer); | ||
// console.log((flag_streaming_status === streaming_status_done) ? "NOT_DONE" : "YES_DONE_NOW"); | ||
// console.log("max_index ", max_index); | ||
console.log("final_index ", final_index); | ||
console.log("curr_index_synth_buffer ", curr_index_synth_buffer); | ||
console.log((flag_streaming_status === streaming_status_done) ? "NOT_DONE" : "YES_DONE_NOW"); | ||
// stens TODO - how to pass in own buffer instead of being given object: out so I can do a circular ring of such buffers | ||
@@ -1524,3 +1521,10 @@ | ||
// media_file : "Ida_Corr_Fedde_Le_Grand_Let_Me_Think_About_It-19WUwZYM7bM.wav" | ||
// media_file : "Justice_Genesis_first_third_sec_tight.wav" | ||
// media_file : "sine_wave_32768_64.wav" | ||
// media_file : "sine_wave_32768_128.wav" | ||
var comm_msg = { | ||
@@ -1527,0 +1531,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
9
3
2866262
18
2558
11