views:

6866

answers:

8

I've written a simple Flash player for a Shoutcast stream. At first it seemed to work reliably, however about 5% of the time users experience slow playback where the stream plays at roughly half of normal speed.

All files being streamed are MP3, encoded at 128kbps/44.1kHz, the same settings as used in the Shoutcast config files, so the issue is not caused by mismatched bit rates as suggested on a number of forums I have read. Has anyone else encountered this problem and possibly found a solution?

Regards,
Alan

EDIT: A sample player can be found at http://radionations.com/utils/players/pulse.swf There is no graphical display as the player is designed to run in the background.

The problem only occurs a small proportion of the time, and only when the player is being loaded in the browser. It does not occur mid-stream.

The player has been tested on a number of different machines running Windows XP, Vista, Ubuntu, and MacOS X. Various different hardware configurations are involved. The problem occurs across all of these test platforms so I am inclined to believe it is not an issue with problematic / buggy audio drivers.

I have encountered the problem both with and without other applications using the audio device.

EDIT: I'm surprised I still haven't found a solution to this problem. So I've decided to come back to it now in the hopes that somebody might know something. Any help is greatly appreciated.

Thanks, Alan

A: 

I believe that the slow playing is caused by audio drivers problems. Can you give a link to the player?

A: 

I have encountered the slow playing problem in your player, about 25% of the times I reloaded it, but only if another application using the audio device is running when the stream starts playing, as I reckon after a quick look. Maybe you should test this situation on multiple computers. I would guess that it's an audio driver problem, I'm using XP 64 and my audio drivers are beta.

A: 

Hello again,

I made a very simple player that streams from your server and it also had that problem. Very intriguing... I then made it start the sound a little bit later, after it loaded 100K and it seems to be working, I don't have time to test it more right now though. You can get it here http://rromania.ro/sc/sc.rar

thanks for that bfi, I'll test it this evening and hopefully it will lead to an improved experience for listeners
Alan
At first I thought your suggestion had solved the problem, however it is still happening with roughly the same frequency as before. Thank you for your help so far and I appreciate any further suggestions you may have.
Alan
A: 

I have attempted to check the difference between expected and actual content loaded in order to determine when to start playing the stream, however this hasn't worked either. I am still experiencing the slow playback. Any help is greatly appreciated

Alan
+1  A: 

This is a flash player bug unfortunately. It seems like the only reliable solution is to roll it back to AS2.

https://bugs.adobe.com/jira/browse/FP-173

Theo.T
A: 

I have been having much trouble getting the stream to even play. It works on my pc but not on the web.

Could you post or email me your AS3 for this? Would be greatly appreciated, I've been trying to figure this out for days.

  • Keith

[email protected]

A: 

It seems to work when after the complete event is dispatched wait 6 seconds so its downloads enough data to run at normal speed ,tried it a bunch of times no slow play yet

A: 

I've been successfully using:

s.load(new URLRequest(mp3),new SoundLoaderContext(3000)); // 3000 is 3sec buffer time

I can't be 100% sure, but since I've been buffering it I haven't noticed any slow play from many reloads.

Hope this helps.