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

Re: [WebAudioAPI] connecting AudioNodes from different AudioContexts

From: Chris Rogers <crogers@google.com>
Date: Tue, 15 May 2012 14:54:28 -0700
Message-ID: <CA+EzO0mGCZ_-jc4_99RJvwQ_vQFUhuSbQbkKL-2HiY-M3DMT6w@mail.gmail.com>
To: robert@ocallahan.org
Cc: olli@pettay.fi, "public-audio@w3.org" <public-audio@w3.org>
On Tue, May 15, 2012 at 2:43 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, May 16, 2012 at 9:30 AM, Chris Rogers <crogers@google.com> wrote:
>
>> On Tue, May 15, 2012 at 2:20 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>
>>> On Wed, May 16, 2012 at 8:21 AM, Chris Rogers <crogers@google.com>wrote:
>>>
>>>> Sorry Olli, the spec needs to be more explicit that an exception will
>>>> be thrown because connections between AudioNodes of different contexts are
>>>> not allowed.
>>>
>>>
>>> Why aren't they allowed? It doesn't seem hard to implement. If you're
>>> supporting MediaStreams integration then it's similar to
>>> context2.createMediaStreamNode(node1.stream).
>>>
>>
>> Because different AudioContexts may be running at different sample-rates,
>>
>
> So resample.
>

I'm not sure that understand the use case here.  If we find one where this
is absolutely necessary, then maybe we could relax this restriction.


>
>
>> and even at faster than real-time (as soon as I add OfflineAudioContext).
>>  So this will not be allowed.
>>
>
> So then disallow connections between faster-than-real-time and real-time
> nodes.
>
> We'll have to figure something out for media stream and media element
> integration with OfflineAudioContext anyway.
>

Yes, there are unique challenges if you're running faster (or slower) than
real-time.  Some things won't make sense such as generating a real-time
stream to be sent to a remote peer.  But that's ok.  The whole point of
processing faster than real-time in an offline context is to render a mix
or "bake" a complex processing effect/sequence to an AudioBuffer.


>
> 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:02 GMT

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