Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

sound attenuation and calculating max distance

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
necros Joined: 16 Dec 2004 Posts: 22 |

Posted: Tue Apr 27, 2010 7:00 am Post subject: sound attenuation and calculating max distance |

given the attenuation value, can i find out the maximum distance the sound will be heard at (before stock engines will discard it and not bother starting it)? i looked at the quake source, but honestly, i just got lost... it seems attenuation is limited to a number between 0-64 (0-63?), but that's about all i got. :S
engines like DP have fixed this 'bug', but for other engines, if a sound is started outside the audible range, the engine will just discard it and not bother starting it.
this is fine for things like explosions that are short lived, but sounds that start and loop forever obviously pose a problem.
essentially, i want to 'register' any entities that should be playing a looping sound and then periodically check if the player has entered audible range since the last check, and if so, restart the sound.
the last part is easy, but i'd prefer an accurate way of calculating maximum audible distance instead of trial+error/guesswork.
ps: i know about the svc 29 hack to spawn real ambient sounds, but i require these sounds to be able to be stopped, which cannot be done with svc 29 ambients.

Back to top |

necros Joined: 16 Dec 2004 Posts: 22 |

Posted: Tue Apr 27, 2010 9:49 pm Post subject: solved |

preach found the solution, if anyone's interested, the post on func about it is here: http://celephais.net/board/view_thread.php?id=4&start=9762&end=9762

Back to top |

mh Joined: 12 Jan 2008 Posts: 910 |

Posted: Tue Apr 27, 2010 11:08 pm Post subject: |

There's a possibility that this value may have been higher in an earlier version of the engine; I recall seeing someone's source once where they had a comment to the effect that it was reduced from 1500, but can't remember where or who. _________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group