[SDL] [OT] Sound and Music
simon.roby at gmail.com
Sun Sep 18 20:56:00 PDT 2005
On 9/18/05, Tyler Montbriand <tsm at accesscomm.ca> wrote:
> It's about as portable as portable gets under UNIXes. mmap originated in BSD
> and now almost everything has it. Even Windows has something like it 95 and
> CE included. I doubt things like Palm and Playstation support it.
> I've been toying with making an SDL_mmap library to make it portable-r,
> because I think memory mapping is very elegant; you get the simplicity of
> loading the whole 50 megs into memory(not even kidding, I've seen lots of
> things do that) without the huge memory waste. The OS decides which bits
> float in memory, and doesn't have to swap any of it to disk to get rid of it
> -- it's already on disk! You can even warn the OS you're going to use the
> memory sequentially, so it doesn't pollute the cache with stuff that's only
> needed once every music loop.
I fully agree, a portable mmap abstraction would be an incredible
addition to SDL. There should be a decent fallback on platforms that
don't support it though...
More information about the SDL