The online racing simulator
#1 - w126
New option - maximum number of car sounds
After reading this thread http://www.lfsforum.net/showthread.php?t=3567 I did some tests comparing fps with sound switched on and off on my computer. I used replays of one lap from in-car view and logged framerate with Fraps. I turned out that when there was only one car on the track switching the sound on caused decrease of minimum fps of about 1,5 % only. But with 12 cars the decrease of minimum fps with sound switched on was almost 20 %. The results are similar when comparing average fps. It looks like this sound overhead grows almost linearly with number of cars.

The reason for such large framerate drop with sound on and many cars is probably my sound hardware being unefficient (SoundStorm) or maybe outdated drivers, rather than LFS using so much processing power to generate sound effects. Anyway, whatever the reason, there always may be people with unefficient sound hardware and implementing this simple idea may help them enjoy LFS even more.

I'd like to propose adding the ability to set maximum number of cars (closest to player's view) for which sound effects are generated.

For example, with 12 cars one has 35 fps min. without sound and 28 fps min. with sound. One could set maximum number of car sounds to 3 (hearing only player's own car and 2 closest other cars) and have over 33 fps min, provided that it is indeed a linear relation.
Quote from w126 :The reason for such large framerate drop with sound on and many cars is probably my sound hardware being unefficient (SoundStorm)

Any integrated sound cards will suck processing power from the CPU, purely because integrated solutions dont have the core processing requirements fullfilled, as a result the frame rate drops.

Granted this is a good idea, but I'm not sure how much this will address the fundamental problem. Regardless of how many inputs it needs to "render" to the soundcard, its still going to suck processing power, and as such is going to cause an increase in frame time (i.e. a decrease in frame rate). As we cannot select how many vehicles sounds to render, its difficult to prove how much it will increase performance, but I'm willing to stake what little reputation that it wont be that much, especially on lower-medium end machines.
#3 - ajp71
IIRC LFS does not use a sound card to do all the generated engine sounds, they are all software, and therefore CPU dependant.
dunno; the other day roadhog was telling me about the new sound card he got, he said he started hearing things he's never heard before when i was playing LFS after installing hte new card
Thats just the new sound card reproducing the sounds better - a naff onboard sound carb (like I use) tends to miss out some of the details. But I agree with ajp a soundcard won't do much or anything to CPU loads. Any benefit you do get will be offset by the drivers for the soundcard
Quote from ajp71 :IIRC LFS does not use a sound card to do all the generated engine sounds, they are all software, and therefore CPU dependant.

Of course it uses the sound card, but it doesn't use EAX or similar. Nevertheless, you're right about the CPU; soundcard or not, it will always suck down CPU power - some more, some less.

Limiting the maximum number of sound sources is pretty common in other games and it wouldn't be too stupid here either.
They've got a 'maximum number of sounds' option in GPL and it definitely helps with FPS, especially on my old box which was a ninja 3 years ago. It's not too bad really - it can play Doom3, but only in 800x600 lol
#8 - filur
+1

I have an integrated ac97 sound chip, full grid of fxo's in some replay
give me 18 fps, turn off sound and i get 40 fps.

I'd like some performance options for sound, and maybe even an option to use a
"lite"-version of the sound system, such as a sample being played at
different speeds.
Good ideas guys! This might be even more important when the sound 'engine' (hoho) improves and gets more complex, but if you can go from 18 to 40fps now already.. this is a must have.

FGED GREDG RDFGDR GSFDG