🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

(SDL) SDL_Mixer song loop pause

Started by
7 comments, last by Raduprv 19 years, 11 months ago
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?
Advertisement
Well, at least is there any one who has had the same problem and also doesn't know what to do?
well i couldnt even get mine to loop.
so you are one step ahead of me :)
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.
Try reducing the mixing buffer size
how easy is OpenAL to use?
i think i will look into it.
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
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