Accurately reading an MP3
Posted: Mon Aug 07, 2006 2:48 am
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.
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.