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

Re: undefined directions in AudioListener and PannerNode setOrientation()

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 26 Aug 2013 14:27:53 +1200
Message-ID: <CAOp6jLYFOpFjrNenVxoUBV=zEgmYL-8SB9kRGtftNEqFQv-hkg@mail.gmail.com>
To: Karl Tomlinson <karlt+public-audio@karlt.net>
Cc: "public-audio@w3.org" <public-audio@w3.org>
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.

Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
Received on Monday, 26 August 2013 02:28:21 UTC

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