Emit Sound?

BlitzMax Forums/BlitzMax Programming/Emit Sound?

H&K(Posted 2006) [#1]
I have a Huge game map with Buildings, trees, lampposts etc. The Player can move round in full Isometric 3d, with the camera taking an intelligent position depending on the situation.
Now some of the weapons that the player has do a continual determination damage, like acid eating the target, or rust.

So Obviously I keep track of the health of the building whilst it can still be within the players point of view, But once its out of view I just do a full calc of the total damage the building (or whatever) would take, and if the building is destroyed, then destroy it.

When the object is still in "Possible Sight" I keep its update going and if it falls down, then I destroy them.
Now here’s where the problem is, for some reason the sound buffer on my computer cannot handle a lot of buffered/Streamed sounds. So what I’ve been thinking is that I should calculate the volume that the sound would make when it reaches the player. And if its going to be well below the background level, then don’t emit a sound. But this would be a lot of work. So I’m inclined not to do it.

So to sum,

If a Tree, (say) falls down in the middle of the forest, and NoOne is there to hear it, should it make a sound?


Regular K(Posted 2006) [#2]
I suppose it would be fine then to not play the sound if the player isn't close enough to hear it. The player won't hear it, so why bother?

But it may require some extra processing to determine if the player is in hearing range or not (well just some simple math)


Arowx(Posted 2006) [#3]
Ok why not pre-calculate the maximum sound horizon of the player, based on size of tree falling and then you only have to omit trees over a given range?

Regards

Merx


H&K(Posted 2006) [#4]
Bump


Dreamora(Posted 2006) [#5]
The answer was given, wasn't it?

Only play the sound if the player is within a virtual "hear range".

As well, make sure you free the channels, perhaps the "cannot handle ..." problems is a problem with too many channels (if it isn't an old system with onboard sound)


H&K(Posted 2006) [#6]
@Dream

Its not a real question. Its a Joke. I cannot undestand why no one seems to have got it. Im reposting it in general discussion to see.