W3C home > Mailing lists > Public > public-audio@w3.org > January to March 2012

Re: a few question: gimbal lock, page visibility, outterconeangle

From: Chris Rogers <crogers@google.com>
Date: Tue, 20 Mar 2012 12:11:17 -0700
Message-ID: <CA+EzO0kkxhrcBjM23j=Q=WSz54MO_6kvW=pU9jX9NzE2A=xq3w@mail.gmail.com>
To: Jerome Etienne <jerome.etienne@gmail.com>
Cc: public-audio@w3.org
On Tue, Mar 13, 2012 at 7:00 AM, Jerome Etienne <jerome.etienne@gmail.com>wrote:

> Hi,
>
> While experimenting with webaudio api[1], i hit some issues which
> triggered questions. I am new to this mailing list, so im not sure it is
> the proper forum. If it isnt, feel free to reroute me :)
>
> 1. How to handle page visibility ?
> When the page isnt visible, what is the recomended behavior ? should i set
> the volume to 0 ? something else ?
> Currently i do nothing special, but it has glitches. The positional audio
> isnt updated. And i hear "clicks" in the audio when the browser is busy on
> some other pages (implementation issue related to scheduling?)
>

Often the expected behavior would be to mute the sound (set gain/volume to
0).  But in some use cases, it may be interesting to keep the sound
playing, for example if the user would like to continue hearing music while
a tab is in the background.



>
> 2. How to handle 'gimbal lock' with positional audio ?
> When the sound is exactly on top of the listener, it is heard as if it was
> from the left, then from the right. At first sight, it seems close to a
> gimbal lock[2] issue. Is this diagnostic correct ? How to handle this ?
> Should i ignore it and say 'well it is rare enougth, nobody will notice' ?
> is that an issue in my code or in the browser implementation ?
>

Interesting question.  I would expect the implementatation to handle
transitions smoothly.  But, I should check the region exactly on top of the
listener to see if I can re-create your problems in the WebKit
implementation.  Perhaps there's a bug, or we're simply not interpolating
as well as we could in that area.


>
> 3. When using audiopannernode, coneOuterAngle seems to be ignored.
> Let me explain. When i change .coneInnerAngle and .coneOuterGain, they
> have the effect i expect. But no matter which value i put in
> .coneOuterAngle, the outter cone seems to be the max possible. According my
> understand, there are 3 states. "inside innerCone", "inside outerCone" and
> "totally outside". Is that correct ? when the listener is "totally
> outside", im under the impression no sound should be heard, correct ?
>

Are you still having problems here?  The three zones you describe
correctly, but "totally outside" is not necessarily "no sound" but instead
depends on .coneOuterGain.  A quick look at the code seems to show it's
doing the right thing, but if you are still having the problem then a small
code sample would be helpful.


>
> Lots of questions on various subjects :) Please, let me know what you
> think.
>
>
> Jerome
>
>
> [1] https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
> [2] http://en.wikipedia.org/wiki/Gimbal_lock
>
Received on Tuesday, 20 March 2012 19:11:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 20 March 2012 19:11:50 GMT