gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] www.weebls-stuff.com, MP3 problem


From: strk
Subject: Re: [Gnash-dev] www.weebls-stuff.com, MP3 problem
Date: Mon, 10 Nov 2008 09:17:55 +0100

On Mon, Nov 10, 2008 at 04:54:49AM +0000, Martin Sidaway wrote:

> I'm trying to get into open source development at the moment and so I'd like
> to get involved in working on gnash.

Welcome !!

> I have looked in particular at the movies
> /flash/pie.swf, /flash/donkey.swf, /flash/angry.swf, and /flash/hairy.swf.
> They all have a looping sound that is set to loop a large number of times
> (say, 50) in the StartSound tag. The movie doesn't actually last for that
> number of loops, so presumably it is just a lazy way of saying "until end of
> movie". In Adobe flash, this is certainly how it is interpreted. However,
> gnash seems to keep the old copy of the looping sound playing when the movie
> restarts.

Restarts by gotoFrame or by manual restart request ?

> An odd feature of this is that when it restarts the movie, it
> first momentarily pauses the old instance (of the MP3), then restarts it
> again when the new MP3 instance starts.

I've been refactoring the sound handler so might have missed something
in there. If you file a bug containing the bug description and an url
to the SWF file (with md5 sum possibly, to make sure it's the same
you've been debugging) it'll help.

> I've put a printf, reporting the value of soundsPlaying, into play_sound. On
> the first run of the SWF, it reports values of 1, 2, 2, 2, ..., 3, 2, 2...,
> while on the second run it reports 2, 3, 3, 3, ..., 4, 3, 3... .

There should be GNASH_DEBUG* macros on top of 
libsound/sdl/sound_handler_sdl.cpp.
They usually help.

> I created my own looping-MP3 swfs using Ming, to see if I got the same
> behaviour, and strangely, my SWFs have the probem in both gnash *and* in the
> adobe player (i.e. where the old copy overlaps with the new copy). It is
> difficult to see how the adobe player manages to "differentiate" between the
> two sets of swf files.

The StartSound tag has a 'no-sync-multiple' flag. When on, the tag doens't
start a new sound if an old (of same definition) is already playing.
I don't think Gnash implements that, but should not be hard to fix currently.

> The other problem is that sound decoding doesn't keep up with output. This
> shows up with "gtk-gnash -v -v pie.swf":
> 
> DEBUG: do_mixing: less samples fetched (1488) then I requested (1880).
> Filling the rest with silence

This commonly happens at the end of the sound. The only way for it
to NOT happen would be for number of samples in each sound to be
a multiple of 1880, which is hardly a requirement...
It's all normal to me, just the SDL thread fetches 1880 samples each 
iteration.

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]