Commit Graph

10 Commits

Author SHA1 Message Date
Chinmay Pendharkar
a8142b20c3 Refactor to remove need for magic constant.
- Removed need for magic constant (largest Number)
- Refactored code to find minimum samples available.
2016-08-09 17:45:35 +08:00
Chinmay Pendharkar
72d7965521 Stop trying to read if no inputs are connected
If no inputs are connected, the `_read` function still keeps looping ( using `setImmediate(this._read.bind(this));` ) to wait for more samples to be available. This can cause the CPU usage to go up (60% on my 2014 MBP) even when no audio is being played.

This fix stops the looping if `this.inputs` array is empty and starts it again when new inputs are connected.
2016-08-07 14:44:24 +08:00
Chinmay Pendharkar
564d31654f Removes input when it's finished.
Removes an input from the array of inputs when it's 'finished'.
2016-08-06 21:22:28 +08:00
6f1fcefe69 Implement int24 for bitDepth24 2015-12-09 15:45:19 +01:00
alfred
797d1f28a0 cleaned out most debug console.logs 2014-01-01 03:49:53 +00:00
alfred
43c2556d8a working example with one input to the mixer 2014-01-01 02:58:53 +00:00
alfred
08c3a63dc1 average mixing 2014-01-01 00:27:03 +00:00
alfred
362a00c967 dont fill up our input buffers too much/too fast 2013-12-31 10:18:59 +00:00
alfred
126266e4d9 input objects with mono/stereo conversion 2013-12-31 10:06:42 +00:00
alfred
16b2285694 outlining the mixer object 2013-12-30 10:50:54 +00:00