Accurately reading an MP3

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
skpa
Forum Newbie
Posts: 1
Joined: Mon Aug 07, 2006 2:44 am

Accurately reading an MP3

Post by skpa »

I've always tried to deal with this problem with PHP but I've always failed: trying to read MP3 frame data at real-time and in rate enough to push to the client without causing skipping.

Around a year or two ago, I built my own PHP Shoutcast server powered by a PHP source and part-DSP, but I always eventually encountered skipping. sleep() and usleep() are not accurate enough for my uses, as they don't hit right on the dot (in my case, always a few ms over). Does anyone have any ideas? A command line tool that would do this would be nice and easy, but I don't know of any and I don't think there are any.
Post Reply