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

Re: Safari's Web Audio vs Chrome's

From: Jer Noble <jer.noble@apple.com>
Date: Fri, 21 Sep 2012 11:08:31 -0700
Cc: public-audio@w3.org
Message-id: <A909215C-2D3F-4D2C-89D2-2BCEE281851F@apple.com>
To: Yotam <matoyotambien@gmail.com>

On Sep 21, 2012, at 10:20 AM, Yotam <matoyotambien@gmail.com> wrote:

> I have a question regarding the differences between Safari vs Chrome's implementation of Web Audio. I have been working on creating interactive music in the browser using the audio API. The most recent song takes users on an intergalactic ride, putting them in control of the sonic energy of the music by manipulating the speed of the spaceship. 
> The song crossfades 9 mediaElementSourceNodes as the speed changes and plays a corresponding visual of flying through space using Three.js. Definitely heavy on the CPU. Chrome seems to handle this well even though it's using up almost all of my processor(s); there are rarely any glitches in the audio and it doesn't fall out of sync almost ever (though i detect and correct this situation when it happens). 
> Safari is a whole other story. The audio starts out of sync and never gets in sync. The crossfades (using the audioGainNode) don't seem to work and they don't initialize to the correct state so when it starts all of the tracks are playing (out of sync with each other, which makes for a very trippy sound, but not the sound that I'm after). 
> So far i've been browser detecting to deny anyone not using Chrome. I would like to change browser-detection to feature-detection and throw a message when people don't have Web Audio, but first I need to get this Safari issue sorted out. 
> Here is the site without the browser detection enabled. check it out on Chrome and then Safari to hear the difference. 
> http://beta.dutchgramophone.com/rocketship/safari.html
> I'm wondering if other people have noticed the big differences in the implementations, or if there are any things that i should be doing differently to make it work on both browsers? 
> Any advice is greatly appreciated. 

MediaElementSourceNodes are not currently supported in Safari.  Unfortunately, I don't believe it's possible to do feature detection in this case.  Perhaps we should throw an exception from AudioContext.createMediaElementSource().  I'd suggest filing a bug at http://bugs.webkit.org to request this change.

Received on Friday, 21 September 2012 18:09:07 UTC

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