Class: Recorder

Recorder

Adopted from Matt Diamond's recorder.js code MIT License

new Recorder()

Source:

Methods

audioStreamConnected()

After the user has given permission to record, this method is called.
It creates a gain point, and then connects the input source to the gain.
It connects an analyserNode (fftSize 2048) to the gain.

It creates a second gain of 0.0 connected to the destination, so that
we're not hearing what we're playing in in an infinite loop (SUCKS to turn this off...)

And it calls this.connectSource on the inputPoint so that
we can do something with all these wonderful inputs.

Source:

configure()

Configure from another source...

Source:

connectSource()

Creates a worker to receive and process all the messages asychronously.

Source:

exportWAV()

call exportWAV or exportMonoWAV on the worker, then call cb or (if undefined) setupDownload.

Source:

getBuffers()

Directly get the buffers from the worker and then call cb.

Source:

initAudio()

Start here -- polyfills navigator, runs getUserMedia and then sends to audioStreamConnected

Source:

playBuffers()

set this as a callback from getBuffers. Returns the source so that a stop() command
is possible.

Source:

polyfillNavigator()

Polyfills for getUserMedia (requestAnimationFrame polyfills not needed.)
As of 2016 September, only Edge support unprefixed.

Source:

setNode()

Creates a ScriptProcessorNode (preferably) to allow for direct audio processing.

Sets it to this.node and returns it.

Source:
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.