[Vorbis-dev] My Flash 10 attempt

Arek Korbik arkadini at gmail.com
Tue Oct 7 14:05:47 PDT 2008


Hi,

On Tue, Oct 7, 2008 at 11:17 AM, Tor-Einar Jarnbjo
<tor-einar at jarnbjo.name> wrote:
> First of all: the new PCM playback API for Flash is rather restricted
> and only allows 44.1 ksps, stereo. Implementing a generic Vorbis player
> for Flash would still require a software resampler between the decoder

Correct, same for fvorbis - at the moment it only plays correctly
files encoded at 44100 Hz, but I have some experimental ideas how that
could be solved...

>
> Second: replacing Array with Vector simplified the code to some extent,
> but I am not able to measure any particular performance gain. I am not
> sure, but it looks almost to me as if the haXe compiler is producing
> much more efficient Flash bytecode compared to the Adobe AS compiler. I

In my experience that's been the case since the mtasc times - most of
the time it does produce more efficient bytecode than Macromedia /
Adobe tools.

>
> New attempt (requiring Flash 10 beta player):
>
> http://flash.j-ogg.de/10/
>
> Old player:
>
> http://flash-j-ogg.de/
>
> Can someone verify that the new player actually causes slightly more CPU
> load than the old player, or is it just my eyes fooling me?

On my machine the Flash 9 version seems to be about 1.5-3.5 times
slower than fvorbis. The new v10 demo hangs my browser (with flash
player plugin version 10,0,0,525 release) every time I try.

It looks like you almost completely changed from using Array to
Vectors. In my experiments the attempts to parametrize Vector with
anything else than int, uint, Number or Object caused pretty bad
performance, plus frequent browser hangs. That might be a bug in the
flash player v10 but, being too impatient to wait for
confirmation/fix, I ended up using Vectors only for arrays of integers
and floats, also resigning from nested/multi-dimensional Vectors as
that didn't seem to work properly in the flash player, either.

Arek


More information about the Vorbis-dev mailing list