distorting sound

Blitz3D Forums/Blitz3D Programming/distorting sound

D4NM4N(Posted 2005) [#1]
why is it when 3d sounds are played in rapid succession (ie, a weapon firing rapdly) the sound gets all tinny sounding and clicky. is there a way around this?


GfK(Posted 2005) [#2]
If you're playing about 20 instances of the same sound on top of each other, you'll get undesirable effects, so either put a delay in, or just play it once as a looping sound.


D4NM4N(Posted 2005) [#3]
thought so, thanks


D4NM4N(Posted 2005) [#4]
hmm, i trued putting in a buffering delay, but the sound seem to distort with distance variation, ie if i shoot into the distance and theres an explosion, then shoot close while the sound is still playing i get the same thing. It seems to happen more when the character is moving


Damien Sturdy(Posted 2005) [#5]
This is a reason not to use 3d graphics [edit: *3D SOUND*]. The state changes when using your card is causing clicks (it doesnt interpolate between values smoothly enough)
its fine on most cards, but sounds a pickey thing on computers. You could quite simply be "buffer overflowing" the audio buffer. I dont think theres alot you can do in that instance other than get a newer card.

Of course there are always other reasons, so, anyone else here with some ideas?


D4NM4N(Posted 2005) [#6]
ok, ive trued to play just one sound by using if channelplaying and ive realised its when the microphone is moved, i get the problem. its fine if my characer stays still. Im using a large scale for ecerything and have to use a lissener falloff of 0.01. Could this be causing a problem, as i dont really know what the doppler and scale bits do (help is a bit vague)


John Blackledge(Posted 2005) [#7]
'You could quite simply be "buffer overflowing" the audio buffer.'
That sounds about right in my experience.
PCs with onboard sound chips often give this effect - add in a new up to date sound card and the problem usually goes away.

One other hint, however you do it, try to get rid of 'overlapping' sounds.
You may want to have separate instance of gunshot sounds in order to coordinate with muzzle-flashes (rather than one sound looping), but if you can make sure that the last sound is definitely finished, before the next starts - in other words don't just leave it to Blitz/DirectSound/SoundCard to handle your sound commands, but make use of the channel functions to really take control of when your sounds start and stop.


GfK(Posted 2005) [#8]
Have you parented the listener to your camera?


D4NM4N(Posted 2005) [#9]
fixed it!! weird... rather than emit a sound in the explosions creation code, if i child a pivot to it and then create a global to store the handle, in my main code i simply have

if exp_sound_handle emitsound(blah) : freeentity exp_sound_handle: exp_sound_handle=0

but only AFTER the updateworld it seems fine!!??!!


_PJ_(Posted 2005) [#10]
Get a better graphics card, something with a little more audio ram available.


TartanTangerine (was Indiepath)(Posted 2005) [#11]
Get a better graphics card, something with a little more audio ram available.


Heh GFX cards with Audio RAM, that's a new one on me.

Get a better soundcard would be better advice. A 24Bit 96Khz card should do the trick


_PJ_(Posted 2005) [#12]
LOL!!!

HAhaha I meant sound card of course. Although..... having said that, I recently upgraded my laptop graphic adapter driver, an action which resulted in my mixer RPC service becoming stopped at bootup. So it was a case of graphics OR sound...

(I chose graphics heh!)


D4NM4N(Posted 2005) [#13]
trouble is i deliberately code on old hardware Duron800 256meg geforce4mx and on board sound, to try and get the most compatable games. I do all my testing on my laptop which is up to date.


_PJ_(Posted 2005) [#14]
Well, my laptop has very poor on-board sound, and i get lots of distortion/jitteriness from sounds in games from this, however it's well within acceptable limits as my laptop fits in above the minimum specs for these games. SO you should be able to get away with it!


jfk EO-11110(Posted 2005) [#15]
Can't you set the audio buffer size in windows? Probably in DXDiag.exe too?

BTW when you have two maximized sounds and play them alltogether, it may be distorted too, since it's overdriven. You need to set the volume of both to 50% to fix it.