[sdlsound] need help putting it all together (sdl_sound,sdl_m ixer,physfs)

Ryan C. Gordon icculus at clutteredmind.org
Sun Dec 8 12:21:21 EST 2002


> I have fixed this issue. Would you like me to send you
> a patch?

Very much so; thank you!

> Also, I added the quick fix that Torbjörn Andersson
> suggested about the problem with the MikMod
> double-initialization infinite loop. It seems to work
> now as I can get SDL_mixer and SDL_sound to work
> together while still having Mikmod compiled in both.
>
> One interesting tidbit though, if Mods are played both
> through SDL_mixer (native) and SDL_sound (decoded by
> and passed raw to mixer) and at the same time, all but
> one stop playing and the remaining one plays at a very
> fast speed. Then the cutoff mod seems to restart at
> normal speed after the other finishes. Quite strange.

MikMod keeps a bunch of global state, such as sample rate of the output
buffer. SDL_sound sets this, and no doubt so will SDL_mixer. If they don't
match, things will break. There's no good way to fix this short of making
sure everything matches and praying, or using one or the other.

When I rewrite SDL_mixer, it will use SDL_sound as a backend for all
decoding, which will fix this, but I've been promising this forever.

--ryan.






More information about the sdlsound mailing list