[ut2003io] CPU Performance (was: Color depth)

Ryan C. Gordon ryan at epicgames.com
Thu Sep 19 15:22:10 EDT 2002


> Well, I just sucked down the OpenAL CVS (say, is there a way just to get 
> the Linux stuff without sucking down the Windows and Mac stuff as well?) 
> and compiled it with --enable-optimizations. I worked under the 
> assumption that openal.so is a renamed version of libopenal.so.0.0.6. If 
> that isn't the case, please correct me.

That is correct.

> I backed up the original openal.so and copied the new one into 
> ut2003_demo/System. I benchmarked both botmatch-citadel and 
> botmatch-asbestos. With the new openal.so, I actually lost about a half 
> of a fps--probably not statistically significant. Even worse, though, 
> the music would sound like it is skipping.

The skipping is part of the "fix" for the music volume. We play music as 
an OpenAL source with AL_SOURCE_RELATIVE on and an AL_POSITION of { 0.0, 
0.0, 0.0 } (in layman's terms, always play the music right against the 
microphone, no matter where it travels or which way it swings. 
Otherwise, as you walk around, the music would get quieter or louder, or 
we'd have to keep track of the music sources in relation to the 
Listener)...in this configuration, for various reasons, OpenAL would not 
take the predescribed gain into account at mixing time, and play the 
source at full volume (the comments suggest this was meant to be an 
optimization). OpenAL optimizes out mixing of sources at volume zero 
altogether (a good idea), so that's why the music was all or none.

Now, you'll notice that playing with the music volume in the menus, the 
skipping becomes more noticable at lower volumes (and continues to skip 
at AL_GAIN of zero!). It could be this is a ut2003 bug that has been 
covered up by the fact the music has been all-or-none, but I'm not sure, 
and this is not a good time for me to track in OpenAL. If someone finds 
a good patch, I'll update the openal.so we ship. For now, it was safer 
to leave the music volume broken.

BTW, Joe Valenzuela has fixed several OpenAL bugs for me on a moment's 
notice. Top rate fellow, in case you were wondering.

--ryan.






More information about the ut2003 mailing list