W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2012

Re: CodecNode

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 16 May 2012 09:55:03 +1200
Message-ID: <CAOp6jLaZVM8_GqXSHuO_W1Li=K0VNoQbbH2i+u3cDUEfkQa2qQ@mail.gmail.com>
To: Chris Rogers <crogers@google.com>
Cc: "Young, Milan" <Milan.Young@nuance.com>, "public-audio@w3.org" <public-audio@w3.org>
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.)

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 21:55:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 15 May 2012 21:55:37 GMT