Sign in to follow this  
dante521

looping problem with SDL_mixer and midi files

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
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

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