
Does good design really make a difference? Implementing software often has no relation to life outside work, where chaos seems to be the rule rather than the exception. You may not be able to control life, but let's not practice chaos when developing software.
Showing posts with label mp3. Show all posts
Showing posts with label mp3. Show all posts
Thursday, February 15, 2007
PHP code
I have heard from several developers that they hate PHP, but I have to admit that every time I need example code to help me do something the PHP documentation has never let me down. Why is that? The PHP documentation allows user comments, just like a blog and the comments are displayed at the bottom of every PHP command. For instance, I needed to find a way to read an MP3 file
and return it to any browser to allow the user to save the file to their computer. Sounds easy, but it turns out the code is quite complex. I searched google for "read MP3 PHP" and found sample code that did not work, and then saw one line at the bottom of the sample that used a PHP function I had not heard of before called "fpassthru". When I went to PHP fpassthru, I learned that using fpassthru is actually much slower than feof and fread. The code I am using was taken from the post named file downloads verified by session vars : 22-Oct-2005 03:36.

Sunday, January 14, 2007
Streaming Audio with MP3
Today was MP3 streaming audio day. I had the task of copying 2 conference audio CDs to a remote web server and then add access to them thru a streaming audio server. Besides waiting for the files to transfer, most of the day was spent trying to figure out how to get the files to stream. I tried the simple approach of having links to the MP3 files, but that forced a download of the file. Then after many googlizer searches, I finally found the help I needed in a custom Flash audio player at boutell.com. I like the allowed customization as I created a playlist type XML file for each CD and that was all there was too it - only 8 hours later!
Subscribe to:
Posts (Atom)