Re: [tuxracer-devel] glTron music
Status: Beta
Brought to you by:
jfpatry
From: Steve B. <sjb...@ai...> - 2000-03-29 06:03:29
|
Jasmin Patry wrote: > > On Mon, 27 Mar 2000, Steve Baker wrote: > > > Jasmin Patry wrote: > > > > Erm - I'm not sure - my son and I played it for a while and then dumped it > > when the gameplay wore a bit thin. If the SDL version is under a month > > old then we probably have the pre-SDL version. > > 0.59 beta (the first version to use SDL) was released on 5 March 2000. > > > The bottom line (for me at least) is that you need to have a call into > > the sound generation/mixing stuff to tell it how much it's allowed to > > generate ahead of time each time it's called. Only the application can > > know how long that should be. > > Yes, I agree. I did some digging in SDL and SDL_mixer today and it does > allow you to specify how much data to buffer. I'm not sure if it allows > you to change that amount at run-time, but that seems to be an > improvement over the libmikmod mixer. There are potential problems due > to the non-determinism of thread scheduling, but my guess is that in > practical situations this shouldn't be a problem. > > One disadvantage of SDL is that it's not as portable as PLIB (Linux is > the only fully supported UNIX-type platform). I'll look into > integrating the libmikmod code (loaders/players) into SL, if it's > something you'd like to see added to PLIB. I believe that someone looked at that once before. I don't think it's impossible - but it may not be that easy either. SL works with a central mixer that asks the various music sources: "Please make me X milliseconds of audio right now" ...hence the sources have to be able to make a particular amount of sound on-demand. Since MikMod doesn't let you tell it how much to generate, that's not likely to work. However, if we only used MikMod for music, we would probably care much less about latency. Hence we could call MikMod to create however much it feels like - store it in a buffer and just hand 'X' bytes over to SL - keeping what's left for next time. Not very elegant - but it ought to be do-able. Personally, I hate to add dependancies on yet more libraries since that adds so much to support hassles down the line. So, given the choice, I'd prefer to add whatever new music formats to the existing MOD player in SL rather than constructing some elaborate kludge to get MikMod's player to drive SL's mixer. I'm biassed though...and right now, I don't have time to do either modification. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |