MP3 Player
BlitzMax Forums/MaxGUI Module/MP3 Player
| ||
A friend has asked me to write a little program that enables him to navigate his hard drive, display *.mp3 files, and when a file is clicked it starts playing. From what i have read on other threads i just need to launch the external player for the file. Problem is I am busy working on another project and i don't really have the time for this at the moment. Does anyone have some source code to do this? nothing flash, just something functional. Can i use your code? I have BlitzMax and MaxGUI. I would prefer the source code so i can learn from it later, but even an exe file would be fine so i can keep my friend happy. Cheers Glenn |
| ||
ExecFile(pathToMp3:string) will do it or if it needs to run side a side with your applications, look into pub freeprocess |
| ||
Download the B3D demo, use this source. |
| ||
I was thinking more along the lines of a gui like the one i just whipped up in LogicGui below, where i can navigate the drive, then chose a file and play it. Dreamora - Your step is what i need behind the button press. TonyG - that will help too. I guess if someone can tell me how to populate the 3 lists (Drive, Folder, Files) then i am 95% of the way there. Like i said, i don't want to spend much time on this as i am doing something far more interesting to me, plus i don't even have any mp3 files to test it with, so if anyone can fill in the blanks with existing code then that would be appreciated. Yes i know it is lazy but it is likely to be about 2 months before i am free to do it properly myself, plus i haven't done much of this maxgui stuff yet. so any help would be appreciated. |
| ||
There are a couple of codes in the code archieves that finds all files and folders, so you might want to take a peek there. I doubt that someone is going to make this for you though. |
| ||
I just figured someone would already have done this. Found the code archives you were talking about so i guess i will do it this weekend. Got to keep the friend happy or the missus will just nag me... Cheers Glenn |
| ||
I'm pretty sure winamp can do this via the media library. |
| ||
A bit too hacky and too much globals but works: Put the mplayer in the same directory. *updated* |
| ||
Thanks Dirk, I will tidy up the gui code a bit this weekend and repost the resulting file for anyone else to use. Cheers Glenn |
| ||
Glenn, no problem. I just checked and found the 'listall' function empty, obviously a copy&paste error on my side. I updated the code box above, please re-save the file, and tell me if it works. |
| ||
yes that works. Thanks very much Dirk |
| ||
I assume Max still doesn't support the playing of mp3 files directly? |
| ||
yes. but with a little effort you could try to get Bass running like here: http://www.blitzmax.com/Community/posts.php?topic=71229#800336 which supports mp3. |