php audio player...maybe?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
brian183
Forum Newbie
Posts: 13
Joined: Thu Aug 26, 2004 1:28 am

php audio player...maybe?

Post by brian183 »

I was thinking about this while making a network radio station over the past week. I was wondering if such a thing is possible. I was thinking using the php-GTK+ classes for a stand-alone audio player. I want it to interface with my network radio station as well as offline files. The only trouble I can see is how to interface the back-end part with the decoders and output for sound card (you know, the stuff that makes a true audio player). Anyway, if anyone has some input on this idea or wants to help out in a project for this...please post contact information.
brian183
Forum Newbie
Posts: 13
Joined: Thu Aug 26, 2004 1:28 am

Post by brian183 »

Ok, perhaps my above post was not enough explanation of what I'm thinking. What I want to do is creat a stand-alone audio player written in php with the PH-GTK+ GUI. PHP can be compiled (or least packeged) into a single .exe file for a win32 based computer. I forget the name of the prog I used to do this with but it did work (BTW if anyone knows what I'm talking about please tell me the name of it because I lost the prog on my comp a little bit ago and I didn't use it that much so therefore I forgot the name). This player will have the ability to interface with my radio server (or any other server that is setup like mine) as well as play local offline files (MP3 for now but more formats later on). The GUI part and basic interface with radio server won't be too hard but the actual audio part will be difficult. Correct me if I'm wrong but what is needed is a MP3 decoder and then ability to interface with the sound card for output. I realize that php isn't really for such a thing but it'd interesting to see if it can be accomplished anyway. If php isn't a good way then perhaps a phython prog that can easily call and use C/C++ classes (I know, C++ can do this but it's a pain to get something like that to work not too mention the interface with server). Or maybe I should just go with a pure C/C++(visual) program. Either way I'd like anyones opinion on this subject, even if you think this is a stupid idea and I should be cast out into a dark alley. It's ok I can take it :wink:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I think it'd be easier in the end to do the whole thing in C/C++/C#, however, you probably require a license for the decoder redistrobution, which costs cash. That's if you include those parts in the product. If you build/use an interface to them, then anyone with the knowledge of how your interface works can create decoders to plug-in MP3/WMA/AAC/whatever...

No matter what, you'll need some external apps or other forms of compiled code hooks to get into the sound card and decode the MP3.. since PHP isn't the best for time critical things like the complex math involved in decoding MP3..
Post Reply