Advertisement

Need alittle music help.

Started by May 10, 2001 09:34 PM
2 comments, last by Chaos Phoenix 23 years, 9 months ago
Okay, So I am sitting next to my bible (Tricks of the Window Game Programming Gurus by Lamothe) and I can''t for the live of me figure out how to use a Mp3 file instead of a MIDI or WAV in my engine. It can obviously be done since alot of new games use Mp3 for ingame music. Any suggestions? CP
Need to decode the mp3 into a wave stream and send it out the playbuffer of the sound card.

Find an open source mp3 player and see how they do it.

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
For MP3s it''s best to use a library instead of writing the decoder yourself. You can use MS DirectShow, FMOD, Bass, xaudio and a number of other audio file libraries (most of the available for free.)
Just be prepared for any licensing issues, if you don''t want them, use Ogg Vorbis. If you dont want to write your own playback code, you can use their open source code.

Waassaap!!
Waassaap!!

This topic is closed to new replies.

Advertisement