Archived

This topic is now archived and is closed to further replies.

Avengre

Can anyone point me in the direction of Mp3 player code?

Recommended Posts

Avengre    124
I wanna add mp3 player into my code, to add background... I assume this is done often... I''ve been pointed to Fmod, but i found it really hard to incorporate it into the code (can anyone point out some tutorials other than those on fmods site?) And SDL... but i had similiar problems with that? Please help?

Share this post


Link to post
Share on other sites
LessBread    1415
mp3 player code will likely be more difficult to implement than fmod or sdl but here''s a url to get you started

http://www.mp3-tech.org/

‘But truth's a menace, science a public danger.’ Brave New World, Aldous Huxley

Share this post


Link to post
Share on other sites
tsuraan    122
Rather than MP3, which is proprietary and stuff, you could try OGG. There''s a piece of code up on flipcode (www.flipcode.com, go to the code of the day gallery) that will play ogg files. They''re just like mp3, but it''s free! yay!

Share this post


Link to post
Share on other sites
HelplessFool    451
tsuraan: they don''t necessarily have to be proprietary. it all depends on what they were created from. if you recorded the original file then its yours but still has no copyrights. The only problem is that nobody who is a game programmer is a band leader or the like.

Share this post


Link to post
Share on other sites
jwace81    160
HelplessFool: The mp3 file format is proprietary. In other words, if you plan to create software that uses this format, then you probably have to pay a licensing fee in order to use the format (the fee might only apply to commercial software though). The OGG file format is not proprietary, which means that you can use it without paying anything to anyone.

Who owns the copyright to the music, whatever the file format, has nothing to do with whether or not the format is proprietary. OGG files, altough free from proprietary restraints, are still subject to copyright law.

j.w.


Edited by - jwace81 on January 2, 2002 6:23:07 PM

Share this post


Link to post
Share on other sites
MirekCz    132
is it just me or microsoft did license it for dshow?
and if you want to use the dshow way you can check my www page (warsztat.pac.pl/mirekcz - press the projekty link) and download my tiny mp3 player. It''s not well commented but it works and might be an additional help to dx8sdk explanation.

Hope it helps

With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster

You can use the following code
Note that you have to rename the mp3 to mpa

mciSendString("open myfile.mpa alias music", NULL, 0, NULL);
mciSendString("play music", NULL, 0, NULL);

...

mciSendString("stop music", NULL, 0, NULL);

Share this post


Link to post
Share on other sites
HelplessFool    451
tsuran: pardon me, i misinterprited what you meant by proprietary reffering to ownership of the original file like the whole napster copyright deal rather than the file format and codecs being the proprietary stuff.

Share this post


Link to post
Share on other sites
ironhell3    122
Hi! i believe that what you look for is fmod (www.fmod.org)
With just 4-5 lines of code you can play mp3, wav, midi nad many more! Now how can you make an .mp3 is a difficult thing

Share this post


Link to post
Share on other sites