SDL_mixer question

Started by
1 comment, last by Sir Sapo 19 years, 1 month ago
Hey guys, I just finished coding a game I have been working on for a little bit now and I ran into a bit of a dilemma. I would like to add some sound effects and music into my game, but it is coded in OpenGL and the only sound library I know how to use is SDL_mixer. Is there a way to just initialize SDL_mixer and use it in an OpenGL program? I know some of you are going to suggest FMod, and if what I am asking is not possible, if anyone has a link to an FMod tutorial I would greatly appreciate it. P.S. The game is 2D so I dont need anything fancy like 3D sound or anything.
My Current Project Angels 22 (4E5)
Advertisement
If you want to use SDL_Mixer, you must use SDL - but you do not have to use SDL for the graphics! Basically it will work like this - you make a SDL app and initialize all of the SDL stuff. Then you just add you OpenGL code and that's it. Take a look at my little tutorial in my guide for how you setup OpenGL with SDL. After that you just add your code and then use the SDL mixer. Of course you will need to be doing quite some changing, that example is very simple and inefficient for a game.
Thanks, nice tutorial btw.
My Current Project Angels 22 (4E5)

This topic is closed to new replies.

Advertisement