Re: Extending MediaRecorder to record from Web Audio node faster than real time?

On Wed, Aug 27, 2014 at 2:15 AM, Jim Barnett <1jhbarnett@gmail.com> wrote:

> If we can construct MediaStreams from AudioNodes (other than
> OfflineAudioContext), then there is no need to pass them directly to
> MediaRecorder, is there?
>

Correct. (Though it's nice to not have to create the
MediaStreamAudioDestinationNode, so people will probably still use this
constructor with regular AudioContexts.)

If that's so, the only case we have to worry about is OfflineAudioContext,
> since from previous emails I gather that we don't want to allow it to be
> used to construct a MediaStream.  As long as it can produce the required
> amounts of data (e.g. 200ms buffers) I don't see a problem.  On the other
> hand, for my edification, if OfflineAudioContext can produce data in faster
> than real time, isn't it already recorded/stored in some way? What is the
> MediaRecorder for? Transcoding?
>

An OfflineAudioContext is a WebAudio AudioContext that does not produce
speaker output and runs "as fast as possible" instead of being tied to a
real-time audio clock. So, some use cases for OfflineAudioContext +
MediaRecorder:
-- Transcode audio files (using AudioContext.decodeAudioData for the input)
-- Edit audio files (adjust gain, adjust playback rate, extract segment,
etc)
-- Synthesize music and record the result

As you note, since OfflineAudioContext can't play audio to speakers, most
of its use cases require some kind of recording. Currently you can capture
samples using a ScriptProcessorNode and compress them in JS (trivial if
you're generating WAV files...) but obviously it's better to allow
MediaRecorder to be used here.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.

Received on Tuesday, 26 August 2014 22:04:07 UTC