W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: undefined directions in AudioListener and PannerNode setOrientation()

From: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Date: Wed, 28 Aug 2013 12:35:53 -0400
Message-ID: <CANTur_4tUE_KLsChf0LiN4scmEMpvf6TF+Y+L2pnf92pjAW05A@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Karl Tomlinson <karlt+public-audio@karlt.net>, "public-audio@w3.org" <public-audio@w3.org>
On Sun, Aug 25, 2013 at 10:27 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Mon, Aug 26, 2013 at 11:37 AM, Karl Tomlinson <
> karlt+public-audio@karlt.net> wrote
>> Would it make sense to have setOrientation() throw an exception if
>> any the vectors are zero or otherwise linearly dependent?
>> It is not possible to determine appropriate panning parameters in
>> these situations, and the azimuth and elevation from the
>> calculation in [1] become undefined because an attempt is made to
>> normalize a zero vector.
>> If the orientation is not known, then I think it would be better
>> to retain the previous orientation than to suddenly change to some
>> default orientation.  Throwing an exception seems the appropriate
>> way to indicate that a setter method was not successful in
>> changing anything.
> With 2D canvas we decided it was better to not throw for singularities
> because you don't want to break the application when it's doing some
> animation that passes through a singularity. I think the same logic applies
> here. So I suggest just silently ignoring the setOrientation call.

That makes sense to me.

Received on Wednesday, 28 August 2013 16:37:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC