Re: CodecNode

On Tue, May 15, 2012 at 2:55 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, May 16, 2012 at 9:28 AM, Chris Rogers <crogers@google.com> wrote:
>
>> On Tue, May 15, 2012 at 2:16 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>
>>> Sure. You can do that with MediaStream Processing :-)
>>>
>>
>> I'm not sure I understand how.
>>
>
> Using the synchronization facilities of MSP.
>
> var inputStream = ...;
> var timeToStartRecordingInputStreamAt = 10.371; // in the inputStream's
> timeline
> var durationToRecord = 5.31;
> var p = new ProcessedMediaStream();
> p.addInput(inputStream, 0,
> timeToStartRecordingInputStreamAt).remove(durationToRecord);
> var recorder = p.record();
>
> (One minor issue with the current MSP spec is that there's no way to
> create a ProcessedMediaStream with no inputs but with autoFinish set to
> true, which is needed here, but that's trivial to fix.)


Ok, thanks for explaining that.  I'm sure we can design a recording stream
API which is simple that will work with the Web Audio API, probably
something as simple as p.record(10.371, 5.31)





>
>
> Rob
> --
> “You have heard that it was said, ‘Love your neighbor and hate your
> enemy.’ But I tell you, love your enemies and pray for those who persecute
> you, that you may be children of your Father in heaven. ... If you love
> those who love you, what reward will you get? Are not even the tax
> collectors doing that? And if you greet only your own people, what are you
> doing more than others?" [Matthew 5:43-47]
>
>

Received on Tuesday, 15 May 2012 22:06:22 UTC