How to play MP3 in c++/opengl

Started by
40 comments, last by Daivuk 21 years, 11 months ago
I guys ! I just want to play mp3 for my music in my game. But I don''t know how using C++, or OpenGl if I can make it using OpenGl. Can someone help me please ? Troa Technologies. (real time ray tracing shadow : DK 3d engine)
Advertisement
C++ is a programming language. You must use an API/library to play music; C++ doesn''t do that.

OpenGL is a graphics API, so it won''t play music either.

For Win32, look into MCI, DirectShow, BASS, or FMod. There are other freeware libraries which you can probably find through Google.
---visit #directxdev on afternet <- not just for directx, despite the name
It''s ok, I will use DirectSound7 for playing Wav file, cuz Mp3 is to expensive in license. Thanks for reply.


Troa Technologies.

(real time ray tracing shadow : DK 3d engine)
You may want to go with DirectShow, or DirectSound8 (I think that's still the name). Its better.

[edited by - Mulligan on May 10, 2002 6:33:09 PM]
quote:Original post by Daivuk
It''s ok, I will use DirectSound7 for playing Wav file, cuz Mp3 is to expensive in license. Thanks for reply.


Troa Technologies.

(real time ray tracing shadow : DK 3d engine)


License?
you should check out fmod.
http://www.fmod.org

-eldee
;another space monkey;
[ Forced Evolution Studios ]

::evolve::

-eldee;another space monkey;[ Forced Evolution Studios ]
You can''t use FMOD in commercial projects without paying a fee. MCISendString works great, but DirectSound performs better.
try www.libsdl.org

http://uk.geocities.com/sloppyturds/gotterdammerung.html
quote:Original post by oeginc
Original post by Daivuk
It's ok, I will use DirectSound7 for playing Wav file, cuz Mp3 is to expensive in license. Thanks for reply.


Troa Technologies.

(real time ray tracing shadow : DK 3d engine)


License?


There is no license in using 3rd-party routines to decode mp3. The only licensing issues arise when you write routines that decode mp3 directly, since there are methods you MUST use to do so which have been protected by <EVIL>intellectual patents</EVIL>…





Anyway, go use FMOD: http://www.fmod.org - it's good for your purposes, and you're not gonna release a commercial game anyway are ya?


========
Smidge
========

[edited by - smidge_tech on May 12, 2002 3:38:31 PM]
--Mr Smidge
ogg vorbis is another file format ya might wanna look at, I belive it''s completly free for anything as well

This topic is closed to new replies.

Advertisement