MP3 Player

BlitzMax Forums/MaxGUI Module/MP3 Player

Glenn Dodd(Posted 2007) [#1]
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


Dreamora(Posted 2007) [#2]
ExecFile(pathToMp3:string)

will do it or if it needs to run side a side with your applications, look into pub freeprocess


tonyg(Posted 2007) [#3]
Download the B3D demo, use this source.


Glenn Dodd(Posted 2007) [#4]
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.





Bremer(Posted 2007) [#5]
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.


Glenn Dodd(Posted 2007) [#6]
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


Perturbatio(Posted 2007) [#7]
I'm pretty sure winamp can do this via the media library.


Dirk Krause(Posted 2007) [#8]
A bit too hacky and too much globals but works:



Put the mplayer in the same directory.

*updated*


Glenn Dodd(Posted 2007) [#9]
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


Dirk Krause(Posted 2007) [#10]
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.


Glenn Dodd(Posted 2007) [#11]
yes that works.

Thanks very much Dirk


Glenn Dodd(Posted 2007) [#12]
I assume Max still doesn't support the playing of mp3 files directly?


Dirk Krause(Posted 2007) [#13]
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.