gvhung / as3mp3streamplayer

Automatically exported from code.google.com/p/as3mp3streamplayer
0 stars 0 forks source link

Some buffer repetitions #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a stream with normal procedure
var mp3:MP3StreamPlayer = new MP3StreamPlayer();
mp3.playStream("http://url.to.stream");
2. Open a "heavy" webpage e.g. youtube or facebook.
3. Scroll up and down this page, maybe open a word processor.

At some points it reproduces the same buffer (the dj scratching effect).
Could i work around these issues in some way? Maybe play with the
soundBufferSize, framesPerSWF properties? What would be the best approach?

I've checked out revision 8 and testing in Windows XP with Adobe Flash
Player 10 in CS4. It is a decent machine for mp3 reproduction.

For me, it looks like a memory copy delay for the new buffer. So for some
miliseconds it replays the existing buffer until the new one arrives. Is
there any way we could let it consume some more memory but avoid the
scratching effect.

By the way, excellent job, i could help too if you think it's possible to
overcome this problem...

Chris.

Original issue reported on code.google.com by chrispet...@gmail.com on 24 Mar 2009 at 10:07

GoogleCodeExporter commented 9 years ago
Quick update... noticed that the situation was really bad when i had Flash CS4
open... It's smoother now and i rarely have the effect (looks like it happens 
on CPU
or memory spikes). 

Original comment by chrispet...@gmail.com on 24 Mar 2009 at 10:40

GoogleCodeExporter commented 9 years ago
When this happens, is the BufferEmpty event dispatched?

Original comment by eeco...@gmail.com on 25 Mar 2009 at 7:23

GoogleCodeExporter commented 9 years ago
Well, no. I cannot see any relation of this problem with the sound buffer. I
sometimes get a BufferEmpty due to normal conditions (not enough data from the
stream) and i can notice a gap in this situation but this is a different kind 
of gap.
Anyway, if i set the soundBufferSize to 10 i never get this gap but i still get 
the
same scratching effects on "high" load.

Original comment by chrispet...@gmail.com on 26 Mar 2009 at 8:47

GoogleCodeExporter commented 9 years ago
By the way, today i noticed that some gaps exist while producing youtube videos 
and
opening facebook at the same time. It looks like this is more a Flash defect 
than one
of your control. If there is no way to overcome this flash problem, I guess a
workaround would be to make the stream gap instead of scratching which is rather
annoying. What do you think?

Original comment by chrispet...@gmail.com on 26 Mar 2009 at 10:43