[SDL] Sound and Music

Marian Schedenig msched at msched.no-ip.org
Sat Sep 17 19:14:33 PDT 2005

On Thursday 15 September 2005 10:56, Andre Krause wrote:
> after some searching the web, i found code how to load a dll directly
> from memory:
> http://www.joachim-bauch.de/tutorials/load_dll_memory.html/en
> i did not tested that, but if it works, one can store even dlls in a
> resource file, unpack it to memory and then dynamically load it !

I didn't want to disrupt this discussion, and found it quite interesting 
(although I see no problem with relying on external libraries for my own 
games), but now that it seems to be over, I'd like to get back to my original 
topic once more. ;)

I'm now expecting to simply keep the OpenAL implementation, and perhaps adding 
an alternative SDL implementation for Stereo games (there aren't any current 
plans for adding surround sound support to standard SDL, are there?).

What I'd still like to know: Is streaming an ogg file from the HD the right 
way to play music, or would it be better to load the entire ogg and just 
"stream decode" from RAM?

This is also connected to some other considerations of mine, a more dynamic 
music engine for my next project. The music would consist of several 
different parts (different ogg files) which are queued one after the other. 
The queue would be modified depending on what's currently happening in the 
game. This would require frequent "context changes" (i.e. switching streams) 
in the music thread, so the question whether to stream from HD or from RAM 
probably becomes even more relevant. (Another idea would be adding layers to 
the whole thing, i.e. playing several music streams at once - e.g. rhythm and 
main meldoy - and only switching parts of these by exchanging the appropriate 
stream... but I expect the additional mixing would make this too difficult to 
be really worth looking into at this point).

Excuse the rambling... I'd still appreciate replies to my basic question. ;)


Hofstadter's law: "It always takes longer than you think, even when you take
account of Hofstadter's law".

More information about the SDL mailing list