strange sound bug

Blitz3D Forums/Blitz3D Programming/strange sound bug

Vorderman(Posted 2006) [#1]
I'm having a strange problem with engine sounds in SRX - after playing the game for a while (perhaps 30 seconds or a minute) then engine sounds will suddenly become muffled, as if some form of filter has been applied.

If I restart the game it's OK for a bit, then it might happen again.

The engine sound sample is being pitched up and down and having its volume changed dynamically to produce the engine noises, so perhaps some damage is occuring to the sample during these changes?

Anyone else experienced such sound muffling?


Ross C(Posted 2006) [#2]
Do you have alot of channels playing at once?


Vorderman(Posted 2006) [#3]
Yes, quite a few -
2 engine sounds combined (ON power and OFF power)
turbo whoosh
gearchange click
2 skid sounds combined (light and heavy skid)

How many is too many?

I've also noticed that sometimes the skid sounds are not being played at all - restart the game and 90% of the time they play OK.

Perhaps what I thought was sound muffling is actually one of the 2 engine channels going off completely.


Stevie G(Posted 2006) [#4]
May be a soundcard issue. I think my old Soundblaster could only handle 16 channels playing simultaneously .. any more than that and strange things happened.

Stevie


Vorderman(Posted 2006) [#5]
Well I don't think I'm up to 16 channels yet, but something odd is going on.

Seems to be worse with some engine samples than others, almost as if pushing a certain sound waveform past a certain pitch or volume can break the sound system...does that sound possible?

I suppose the problem samples might not be completely clean, so perhaps they have peaks or troughs that, while inaudible to us, are enough to break the system or cause the sample to be shut down?


KimoTech(Posted 2006) [#6]
i had the same problem once a time, but i just upraded my driver, and updated my directx, and then the problem was gone.. but if u have an onboard soundblaster, it can be because your cpu is busy, and havent enough resources for the soundblaster..


yinch(Posted 2006) [#7]
Hi Vorderman,

Are you using PlaySound to play the sound each time? Because it might be assigning a new channel each time you trigger the sound.

Perhaps you could use PauseChannel and ResumeChannel for the samples. This just uses the one channel for each of the sounds.

yinch'06