Reputation: 476
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
Upvotes: 0
Views: 10064
Reputation:
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.
Upvotes: 0
Reputation:
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
Upvotes: 0
Reputation: 9257
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
Upvotes: 1
Reputation:
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
Upvotes: 0
Reputation:
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.
Upvotes: 0
Reputation:
I believe that the slow playing is caused by audio drivers problems. Can you give a link to the player?
Upvotes: 0