The online racing simulator
#26 - axus
Sound!

First of all, a few positive comments on the new system. I think that the sound is a tad bassier and I actually like it more now... could be placebo effect but I think I can hear a difference. Apart from that, I also noticed a difference when two sounds are mixed - ie. cars racing closely etc. - sounded really nice! I did get a small drop in FPS (3-5) but its not really too bad.

As for the questions:

1+2) I get a not-too-bad delay at 3 sound blocks, any higher and there's too much delay. I get skipping in sound even with a high sound blocks value (5), but certainly not as bad as on 2 sound blocks - on South City anyway.
3) Windows XP SP2 32-bit
4) Sound Blaster Live!, standard Microsoft driver.
sound bug
hello,

i have problems with the new sound system.

i have a suround sound headset.
but when i drive close to some body . at the left side!!!
the i hear the sound goning to left right in my head set.
so first sec sound left. second sec sound right and then left , right ......................

i hope you can understand my problem.

reintjan


Small edit i use win XP(32bit) SP2
Left/Right sound bug
Yes, same problem here on both Vista and XP. I forgot to mention it in my first post.

When driving close to another car, the other car's engine sound changes from left to right. It's like when two sound waves elimate each other (e.g. two tuning forks with nearly the same frequency).

Edit: I've just done some tests and this is definatively a new bug which came with the new sound system in U21. With the old sounds (U20) the problem doesn't exist.
OK, here is another. The sound seemes a little bit different to me. Dont know how to explain it exactly, maybe..... it is more raw. I used headphones instead of speakers to do the best sound analysis.
Back to the topic.

1+2) With sound blocks higher than 1 there seemes to be a really little sound delay which disappeas when sound blocks set to 1. Sound crankles a bit when driving along walls. Crankling seemes to be smallest when sound blocks are 1, increasing it adds some more crankles, but nothing serious. Only thing that really changes when I incerase SBlock level is "sound popping" - I just floor the throttle and listen. Higher SBlock = more pops.
3) WinXP Pro SP2 patched
4) SB Audigy SE, original drivers

Patch U20 worked great with 0.10ms delay.
Just tried a few AI races on SO Long, and yes, there is some crackling. Didn't hear it at first because it's really pretty sublte on my system, but noticeable nevertheless. I also got the sound-switching from left to right when driving near an AI. Overall the sound scape seems to have changed too, everything sounds a bit "different" and IMO quieter than before.

1) No lag, using 1 or 2 blocks, noticable at 3+. Skipping... hrm, yes a bit, I guess. Not really 100% identifyable as clear skipping, though.
2) Not really, using 5 blocks seems to make everything sound even worse.
3) WinXP Pro SP2, patched
4) SB Audigy 2 ZS

Also, when applying full throttle and turning off the engine, as soon as it hits 0 rpm, you hear a little "clack", as if a microphone was turning on/off. If you then turn the engine on again, you immediately hear a "frrrrrrr" but it takes a while till you actually hear the engine. But I believe this was similar in U20, so
engines are still DEFFINETLY not loud enough; after a little test to see how far i can hear engines froms proves to be about 150 meters when they are comming towards me... in lfs, with my sound up rediculously loud (enough to destroy them if anything else on my computer makes a noise) i am only 70 meters

and now i found a new bug.. from 70 meters from a car to 75 meters.. the sound completely disapears.. absolutely completely disapears, i mean .. nothing is there; and then you move in 5 meters, and the sound comes back and its quite loud
1. No - I have no problems at all. Delay becomes noticeable at Sound block 4-5.. But it's completlly OK with default setting.
2. -
3. XP SP2.
4. Aureon 5.1 Fun. Not sure about drivers.
ok i tested LFS U20 and U22 under vista RC2

U20 still has same soundlag problem as RC1 and before.. my guess is also that its because soundblaster didnt release new drivers yet for RC2.. im still using the ones back from july.

about U22 .. works best with soundblock of 3 / 4 (4 is slightly more stable) .. also noticed when you switch soundblocks to fast LFS completely freezes up in vista..

also in U22 its like (im not sure how to describe it exactly) the "sound positioning" is kinda weird.. when you crash into a wall.. you dont hear a crash sound.. and when the car drives by it sounds different compared to xp.. like you miss 1 speaker or something in a surround set...

i used bios pci latency of 64 (default)..

this is all i can tell so far.. im using a sound blaster xf-i elite pro.

also 1 major thing.. dont use transparent sidebar gadgets in front of LFS.. that makes the soundcrack / pops even worse..

small update : in XP SP2 with U22 all soundblocks works fine but i still have that "sound positioning issue".. still dont hear anything when crashing into a wall at high speeds
i get the same crackling/popping tweak does, bf1 in idle (strangely enough that was gone after restarting lfs) and when theres lots of echos
and i believe that theres more lag than with the old system even with blocks set to 1 (very noticeable in how it takes longer for the sound to cut out when tc cuts in)
oh and the old system ran flawlessly with .1 lag on my machine

winxp-sp2, alc850 with drivers from the nf4 package

and while youre working on the sound system could you add a slider to set the volume for the engine ?
Some feedback...

1) Do you get lag (delay when pressing throttle) or skipping (gaps in sound)

Skipping (or crackling).

2) Can it be solved by changing Options/Misc/Sound Blocks setting

Setting the Sound Blocks to 5 reduces it, but doesn't completely eliminate it. Again, most notable near barriers.

3) What operating system do you have, 98, XP, Vista32, Vista64

Windows XP SP2 + all hotfixes

4) What hardware : sound card + drivers if you can find that info

Compaq (hp) tc4200 laptop + SoundMAX Integrated Digital Audio + driver version 5.12.1.5250
U22, I can get some very slight crackling in the BF1 at south city but I need to turn the volume up so much it's hard to tell if it's caused by LFS or if it's just distorsion. In a replay with ~17 GTR's on the grid i got some cracks/pops. Still hear steps in engine sound, they're smaller but still very audible, specially in the XFG. Don't know if steps is the right word for it so i made examples, these are very exaggerated, LFS sound isn't this bad.

All U22 tests with sound blocks at 1, there's no lag or delay, just these steps in sound. Delay/lag at 5 blocks is extreme. I run U20 with sound lag at 0.15s.

XP, 3 GHz Celeron, Realtek AC97 WDM Drivers rev.3.93.
Attached files
steps.mp3 - 10.4 KB - 317 views
u20-no_steps.mp3 - 10 KB - 291 views
Thanks for the feedback.

Warning : long semi-technical paragraphs that aren't important to read - you can just skip to the end line if you like!

It's interesting that the feedback from the Vista sound programmers, when the old sound lag issue was described to them, was that they won't fix it. And they basically blamed the sound issue on me by saying that writing to an already submitted sound buffer was a bad thing to do (though they didn't mention that it worked fine in all previous versions of Windows). Anyway on studying the documentation, I decided to take their word for it and reprogram that lower level part of the sound system. Well now in U22 LFS never writes to a submitted sound buffer, it only writes to buffers THEN submits them when Windows reports that it is finished with one of the buffers it has. This method is supported by the documentation. I'm really doing it BY THE BOOK now - and still there is lag in Vista. Or at least, LFS needs to send 3 or 4 sound blocks ahead, to overcome that delay issue which still looks like a Windows bug to me. And these blocks sent ahead, add up to lag.

As I see it now, there seems to be a delay in the delivery of sound buffer data, to the sound card itself, somehow, within Vista. It doesn't matter if I program it the old "wrong" way or the new "right" way - in both cases, there is a delay in delivering the sound data to the sound card. It seems like quite a problem to me and just a bit unfortunate / annoying because this is something I just have to deal with, because the MS sound developers decided to make it work a different way. I'm not sure what to do, perhaps I should try using DirectSound instead of waveOut. I wouldn't be surprised if the same problem appeared again even then! But maybe they have streamlined DirectSound and neglected waveOut... I guess I won't know until I try.

Anyway, the U22 test is a bit confusing. After reading your reports and investigating the echo crackling at South City with headphones (and finding the echo code quite hard to understand) I removed the echo code completely to see which problems it cured. A lot of crackling did go, as expected but then there was still distortion and a bit of crackling, specially when racing against an AI car around South City. However this distortion, strangely enough, was not so bad when tested on another computer.

The result is that there are more problems with the sound than originally expected (and here we aren't even mentioning the actual quality of the car engine sounds which is a separate issue). It's a slight problem for bug reports, distingushing between the Windows issues and the LFS issues, while LFS is producing crackling and that can sound a bit like the skipping.

I need to make a cleaner version of LFS sound that is capable of producing the expected sounds without bubbles and crackles. And then we need to reassess the situation with Windows.
#38 - wien
1) Do you get lag (delay when pressing throttle) or skipping (gaps in sound)
Skipping (or crackling i would say) in music and other sounds with sound blocks < 4. I also get a wierd "pitch-stairstepping" effect when revving the engines. (Like Filur up there ^) No noticeable lag.

2) Can it be solved by changing Options/Misc/Sound Blocks setting
The skipping, yes (Though I also get the echo crackling), the stairstepping doesn't change.

3) What operating system do you have, 98, XP, Vista32, Vista64
Windows Vista RC2 32bit

4) What hardware : sound card + drivers if you can find that info
AMD XP 3000+, 1GB, Radeon 9800 - Sound: Terratec DMX6Fire (Driver v5.40.3.130)

I also get the feeling U22 doesn't run as "smooth" as U20 does here. (Graphics-wise) The FPS is the same, but it feels like it stutters a bit, if that makes any sense. In the past I have had that problem with a bad sound-card, so I'm guessing this is sound related too. Could be I'm imagining things, but I might as well mention it.
I don't know if this will help but it used to be the way to setup windoze for doing recordings with a software studio.

If you go to device manager, sound video game controllers, Audio codecs, Double click and go properties.

Here you can control the priority of the various codecs and this can make a difference in performance.

As I don't know which codec LFS uses my experimentation ends here but if we knew then experimenting here may help with lag etc.

This is relevent for 98 thru to XP SP2 but I don't know if it would work with SP3 as I refuse to to have anything to do with vista for as long as possible.
#40 - axus
I just updated my sound card driver with the proper Creative one and it did seem to fix the performance loss I'd experienced. It also removed a large amount of the crackling and popping but not to the extent that its "fine". The cars do sound a lot more like they have engines all of a sudden though - the sound is more "blank" between the seperate explosions I think.
Quote from XCNuse :
and now i found a new bug.. from 70 meters from a car to 75 meters.. the sound completely disapears.. absolutely completely disapears, i mean .. nothing is there; and then you move in 5 meters, and the sound comes back and its quite loud

That's nothing new, it's always been like that, now the distance is increased but it's like it was before.

And yes, having the same issues like everyone, weird sounds when driving near walls and sounds of other cars goes weirdly left to right (XP SP2, Hercules something soundcard). It's like echo travelling too much and bouncing back, but I guess that's not possible if it still happens with no echo code.
Quote from Scawen :Thanks for the feedback...

Bummer , now you have to hold yourself up with some more sound fixing. But atleast you can be sure that issue is finally "done" when you're finished.

Another thing I noticed, was when I drove into the middle of five circular parked AI's, that the sound was like "BrrRRrrRRrrRRrr *CHHHHHHZZZZZZT* rrRRrrRRrrRRrrRR *CHHZZZZT* rrRRrrRR *CHHZZZZZZZT* ...", so really long interferences, almost sounding like white noise if I remember correctly. It also seemed that the sound level wasn't staying the same, but gradually growing and then falling again, in a big slow and almost unnoticeable wave.
sorry i didn't even notice there was an update until yesterday

owell.. i'll answer the questions while im in this thread anyway

1: yes i have a delay.. but thats only when i increase the blocks, so i guess that might be a no? and i dont think i get gaps
2: yes (well.. that solves question 1)
3: XP
4: stock; SoundMAX digital audio.. actually it might be whatever a UAC3553B is
Quote from Bob Smith :1. U20 (and all earlier versions) - never heard problems with sound (apart from when car boost is cranked up to 20, then it clips to hell).

Test on main PC

U22 does give crackling issues. When there is no echoing, everything is fine.
Echo boost at normal (for me, 1.3) - When close to a wall, some soft crackling is present from time to time (only seems to happen at certain rpm.
Echo boost maxed (3.0) - loads of crackling when close to a wall, quite loud now, with some break up (skipping).

Increasing the sound blocks may or may not help the problem, if it does the difference is subtle, but certainly does not cure it. If anything the crackling might be slower with a higher block setting.


same here,

3: Win XP Pro SP2
4: M-Audio Delta Audiophile 2496, latest driver
I love the technical side of things! I can feel your pain Scawen...
How about an updated testprogram with the new method?
Then it might be possible to see if it's an LFS issue or an waveout callback issue.
I guess you will be an expert on sound when you are done
Quote from Scawen :I need to make a cleaner version of LFS sound that is capable of producing the expected sounds without bubbles and crackles. And then we need to reassess the situation with Windows.

Small suggestion: What about testing DirectSound / trying to fix the windows issue first? I think that's the main problem now as it seems to multiply all the other issues. In U20 I didn't encounter any sound problems, except the crackling in rare situations. So in my opinion a sound like in U20 (with 0.1s lag) would be fine, it doesn't need to be that perfect for now.


Quote from AndroidXP :Another thing I noticed, was when I drove into the middle of five circular parked AI's, that the sound was like "BrrRRrrRRrrRRrr *CHHHHHHZZZZZZT* rrRRrrRRrrRRrrRR *CHHZZZZT* rrRRrrRR *CHHZZZZZZZT* ...", so really long interferences, almost sounding like white noise if I remember correctly. It also seemed that the sound level wasn't staying the same, but gradually growing and then falling again, in a big slow and almost unnoticeable wave.

Looks like LFS can simulate Interference. The AI cars produce almost identical sound waves which overlap each other and interfere. So you will get an envelope-wave which is hearable in the "growing and falling" volume.
Quote from Racer X NZ :As I don't know which codec LFS uses my experimentation ends here but if we knew then experimenting here may help with lag etc.

I don't think that the LFS uses any codecs. I'm quite sure it uses its own codecs for decoding org vorbis and outputs always PCM signal to Windows.
I found some notes on what to do and what not to do with directsound.
For example that the writecursor in IDirectSoundBuffer::GetCurrentPosition is bad and that you should maintain your own. It's very old but might be applicable today aswell.

www.gamedev.net/reference/articles/article710.asp

Read from googles cache if link above is down:
http://www.google.com/search?h ... sp&btnG=Google+Search




There is also info stating that one should use DSBCAPS_GETCURRENTPOSITION2 to get a more exact position.

(I'm bored at work and thought I'd work google a bit hehe...)
oke here's the man whit the plan

go to options than misc, after that you see the sound blocks put it on 3

i repeat 3!

than it was perfect at my house

byebye
Quote from BulliT :what to do and what not to do with directsound.

Maybe you (Scawen) could try getting in touch with some DirectX/DirectSound software synthesizer developer, the general approach to buffers etc while working with realtime generated sound can't really be a secret.

FGED GREDG RDFGDR GSFDG