Sign in to follow this  

SDL_Mixer

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

Are there any drawbacks to using this as opposed to writing my own sound stuff? It seems going that low level would be more trouble than it's worth but I'd like to hear from people who have done both.

Share this post


Link to post
Share on other sites
Quote:
Original post by mrchrismnh
Are there any drawbacks to using this as opposed to writing my own sound stuff? It seems going that low level would be more trouble than it's worth but I'd like to hear from people who have done both.
SDL_mixer provides a solid, if limited, set of features that should be sufficient for many games. It doesn't include more advanced features such as pitch control and pitch shifting, doppler and other similar effects, etc., so if you need these you may need to look at other libraries. If all you need though is the basics (music channel and multiple effects channels with volume and pan control), SDL_mixer is probably a good bet.

Up until recently at least, a significant drawback of SDL_mixer was that ogg music tracks would not loop correctly. I think I remember reading on the SDL forums that the looping problem was fixed in a recent update to SDL_mixer, so if you download the most recent version, you may find that it's not a problem.

In any case, AFAIK SDL_mixer still doesn't support track queueing, which can be useful for making tracks with heavy use of effects loop seamlessly, and for making tracks seem less repetitive by assembling them out of multiple different sections. Because I wanted this feature (and also because of the loop problem), I went ahead and wrote my own ogg streaming code and mixed the music 'manually' using the music mixing callback. (The fact that you can override the default mixing behavior and plug in your own code is a very nice feature of SDL_mixer, since it allows you to do things with the library that might be impossible otherwise.)

Share this post


Link to post
Share on other sites

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