looping problem with SDL_mixer and midi files

Started by
1 comment, last by c0uchm0nster 16 years, 2 months ago
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!
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).
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.

This topic is closed to new replies.

Advertisement