Jump to content
  • Advertisement
Sign in to follow this  
Lord_Spatulator

BGM w/ SDL.

This topic is 4895 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm relatively new to SDL and I'd like to impliment some MIDI background music (and probebly eventually sfx) to my game. Where would I start? Does anyone have any coded examples? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Yes, you will need to get SDL_Mixer for the sound library. Then you can take a look at this tutorial that makes a game and uses it. You can use a .mid file instead of the .xm file. I just tried it out. music = Mix_LoadMUS("test.mid"); and it will work fine. That tutorial will also show sound fx as well. Good luck!

- Drew

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
As an alternative to SDL_mixer, you could use FMod which, in my opinion, is more powerful.


Agreed! Way more powerful, but way more expensive for distributed products [smile]. I will cast my vote for either SDL_Mixer or OpenAL[wink]. Although I have yet to find an example of playing MIDI with OpenAL...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!