Sign in to follow this  

SDL_mixer question

This topic is 4667 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

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4667 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this