Jump to content
  • Advertisement
Sign in to follow this  
M2tM

SDL_Mixer sound playlist position issue

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

The issue I'm running up against is described here in detail (by me): SDL Newsgroup I will summarize the problem (which is not exact to my implementation, but covers the issue properly). SDL_Mixer has a c style function callback (void function()) which is called whenever a sound has finished playing. I have a singleton which contains a reference to an active play list which I access from within this callback. I can play the next song from within this callback, this works fine however there is a catch. I want to position the audio for the play list so that it persists from one sound to the next. To do this I call an sdl effect function (Mix_SetPosition) on the channel that has just finished playing which creates another c style callback internal to the library which is CLEARED just after the callback I need to set it from finishes. So effectively I cannot set the position from within this callback. My question is if anyone with sufficient SDL_Mixer xp could point me in the right direction of playing a list of sound chunks in a row using the SDL_Mixer callbacks in such a way that I can also apply effects to each new song as I begin playing it (not music chunks)

Share this post


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