[SDL] Problems looping with SDL_mixer

Started by
-1 comments, last by Sej 16 years, 2 months ago
Hi. I'll post the code we're working with tomorrow, but I don't think you need it to answer this question. Once before, we used title music that looped perfectly in general audio playing software, and from looking at the wav, you could see that there was no silence or gap at the end or beginning. Basically, SDL_mixer inserted a little blip of silence between playback when the ogg was on autoloop. We had the same problem with a different game using our newer engine and SDL_mixer is creating this audio glitch again. This time, it's more than just title music. The concept is similar to but not as complex as the bgm in games like Every Extend Extra. The complexity of the music increases as the game's difficulty increases. Since we're not autolooping, we thought the problem wouldn't occur, but even when SDL has to play a certain number of tracks in an order depending upon the player's progress (if you don't make it to the next level, it loops on that level's sound, but if you do make it to the next level, it waits for that sound to end and appends it with the next one). It chooses the sounds in the right order and plays them correctly, just with the blip in between. We tried automatically setting a delay to 5 milliseconds thinking it might override SDL's handling, but the delay was still more like half a second. We then decided that perhaps it was having trouble decompressing the ogg files and it was slowing it down, but the same thing happened when we switched to mp3s. Tomorrow, I'm going to suggest we try with wavs, although we won't accept that as a solution because they are too large for an easily distributable puzzle game, and I'm going to suggest that we try the files as sound effects instead of as music, because direct sound might handle it better. Unfortunately, I don't think this is a directsound problem. I've seen other people post about this regarding oggs and midis, but there haven't been any responses. The same thing happens in fullscreen and windowed mode, so it's not like the computer doesn't have enough resources to function properly. We aren't even maxing out the CPU with this one. As I said, I'll post some of the code tomorrow afternoon (even though it's my birthday and I think I might rather be eating cake ;_; ). I want to see if anyone has come up with a solution to this, because the idea of writing our own ogg-handling library is both daunting and a pain in the ass.
_________________________________________________________________________We are Borg. Your bioligical and technological distinctiveness will be added to our own.

This topic is closed to new replies.

Advertisement