Jump to content
  • Advertisement
Sign in to follow this  
dante521

looping problem with SDL_mixer and midi files

This topic is 3884 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 am using SDL_mixer for sound for my game and am trying to have a midi that I created loop while the application is running. Unfortunately, between loops there is a slight pause, which has me pretty stumped as a first-time SDL-user. Since the midi is custom, I can say for sure that there is no silence at the beginning or the end of the file itself and loops seamlessly outside of the application. Here is a brief block of code which is resulting in the problem:
SDL_Init(SDL_INIT_EVERYTHING);
Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096);
Mix_Music *music = Mix_LoadMUS("whatever_song.mid");
Mix_PlayMusic(music, -1);


Any help or insight would be appreciated, thanks!

Share this post


Link to post
Share on other sites
Advertisement
I don't have an answer, but I'll echo the question (as I've also noticed that music files played via SDL_mixer - .ogg in my case, rather than MIDI - tend to hang up briefly when they loop).

Share this post


Link to post
Share on other sites
I'm running into this issue too. I switched to sdl audio because fmod's linux support was soo terrible. I noticed someone posted this question the other day on the sdl mailing list as well, no response there either.

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!