Chrome and PPAPI Flash Audio Syncing Bug

In a somewhat Microsoftian move, Google decided to change the standard browser plugin architecture called NPAPI for Chrome and bundle a custom port of Flash which uses it. Sadly, this has lead to some differences for that version of Flash and, unfortunately, new bugs.

The bug which is mainly causing me despair at the moment, is that there seems to be a small delay between telling a sound to play and it actually playing. Although small, it is noticeable enough to make the game I’m working on feel like it’s a badly dubbed film.

Example

This is can be illustrated by the following Flash movie. When you move your mouse over the blue rectangle, you should hear a rather jarring BZZZZ noise and simultaneously the square should turn red:

Loading movie… (or maybe not if you block Flash or don’t have it installed)

On non-Chrome browsers, or if you disable the PPAPI version of Flash in Chrome, this is indeed the case. However, if you try it in Chrome with the PPAPI Flash plugin, there’s a very short delay after the square turns red before the sound plays. It’s easier to see and hear when comparing it with another browser using the standard Flash plugin.

Sadly, I can’t work out any suitable hack to get around this issue, so I’ve opened a bug on the Chromium project:

Example Source

Lest you think I’ve coded anything especially insane, you can grab all the sources for the test movie:

Comments