(SDL) SDL_Mixer song loop pause
I'm using SDL_mixer to play OGG Vorbis files in my application. I use Mix_PlayMusic(my_music, -1) with the loop value set to -1 for infinite looping. The problem is that there is a long pause between each time the song is played. Is there anything I can do about that?
Well, at least is there any one who has had the same problem and also doesn't know what to do?
SDL_mixer sucks. Use OpenAL instead.
And yes, I used SDL_mixer too, in the beginning. But it had a lot of bugs, such as: If you set it to play at, say, 22Khz and your sample was 8Khz, it played it really badly (lots of statics). Then if you had too many sounds at the same moment (too many as in more than 4, on some cards) it did some really loud, bad noises. And other stuff like that.
And yes, I used SDL_mixer too, in the beginning. But it had a lot of bugs, such as: If you set it to play at, say, 22Khz and your sample was 8Khz, it played it really badly (lots of statics). Then if you had too many sounds at the same moment (too many as in more than 4, on some cards) it did some really loud, bad noises. And other stuff like that.
Well, it's pretty easy to use. And you can get 3D sound and other nice things, unlike SDL_mixer.
Thanks. OpenAL looks a bit more complicated than the opensound()/playsound() interface that I'd like, but if it works better it may be worth it. I've also found this tutorial that looks interesting:
http://www.devmaster.net/articles/openal-tutorials/lesson8.php
http://www.devmaster.net/articles/openal-tutorials/lesson8.php
Unfortunately I can't help you with OpenAL, because I never used it (some other programmer ported the SDL_mixer part to OpenAL). However, he did it in a week or even less, so it shouldn't be that hard. If you want real life samples, feel free to download the Eternal Lands client, and see how we did it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement