ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Support for SNDINFO attenuation

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Accepted / To be Implemented Requests
View previous topic :: View next topic  
Author Message
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Sat Dec 28, 2013 10:24 am    Post subject: Support for SNDINFO attenuation Reply with quote

Currently there is no way to control the sound volume falloff over distance. SNDINFO has this in zdoom which is missing from zdaemon:

$ambient 1 attentest point 0.0 periodic 1.0 1.0

The above code defines a point sound playing from ambient sound 1 thing, with no attenuation, playing periodically (per sec) with full volume.
(attenuation is the float number after point keyword, and it is optional)

and

$attenuation aliasname value

This is a generic approach, since you can control any sound's attenuation defined in SNDINFO, not just ambients.

and which would be really nice to have:

$rolloff soundname <mindist> <maxdist>
Quote:

Sets the attenuation for the sound. <mindist> (default 200) is the distance from the center of the sound trigger at which the sound is played at full volume, after which the sound drops off in volume until it hits <maxdist> (default 1200) is the distance at which the sound becomes inaudible. This allows different sound curves to be defined on a per-item basis.


http://zdoom.org/wiki/SNDINFO
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Fri Aug 26, 2016 3:36 pm    Post subject: Reply with quote

Don't like to bump my own post but lacking the control of sound attenuation is really bad. To simplify the request lets concentrate on one feature only:

Code:
$attenuation aliasname value


Defines a multiplication factor for sound attenuation. Giving a value of zero will result in a sound that is always played with no attenuation, that is to say at full volume.

from http://forum.zdoom.org/viewtopic.php?f=3&t=51408#wrap

Attenuation is done by multiplying the sound's distance by the attenuation value and using that as the distance in volume calculations.
For example:

If attenuation is 2, then the volume at a particular distance from a sound will be the same as the volume two times further for the same sound with an attenuation of 1.
If attenuation is 0.5, the the volume you hear will be the same as the volume at half the distance when the attenuation was 1.



Example definition:

Code:
machinery/pointsound DSMCHSND
$attenuation machinery/pointsound 2.0


As per above definition, the sound volume of machinery/pointsound will fall off twice as fast with distance compared to the same definition with standard 1.0 attenuation.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Tue Aug 30, 2016 10:06 am    Post subject: Reply with quote

There is old DeHackEd value that can customize volume (or fade?) of sound. It could possibly be used to work-around this but either maybie not.
Back to top
View user's profile Send private message Send e-mail
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Sun Mar 18, 2018 8:08 pm    Post subject: Reply with quote

From d_dehacked.cpp in 1.06 source:

Code:
// The only remotely useful thing Dehacked sound patches could do
// was change where the sound's name was stored. Since there is no
// real benefit to doing this, and it would be very difficult for
// me to emulate it, I have disabled them entirely.


Apart from the above comment, sound patches used to control sound priorities. Although I've never seen such dehacked patches in action, I guess the priority was used to determine which sound to play when more sounds are to be played on the same channel simultaneously. However, there is / was no setting to control sound falloff in dehacked at all. That is a job for SNDINFO.

The lack of sound attenuation control feature becomes quite disturbing on maps with a lot of things emitting sounds at once.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Aeyesx
Spamming!


Joined: 13 Oct 2012
Location: Czech Republic

PostPosted: Sun Mar 18, 2018 8:14 pm    Post subject: Reply with quote

Body-Guard wrote:
From d_dehacked.cpp in 1.06 source:

Code:
// The only remotely useful thing Dehacked sound patches could do
// was change where the sound's name was stored. Since there is no
// real benefit to doing this, and it would be very difficult for
// me to emulate it, I have disabled them entirely.


Apart from the above comment, sound patches used to control sound priorities. Although I've never seen such dehacked patches in action, I guess the priority was used to determine which sound to play when more sounds are to be played on the same channel simultaneously. However, there is / was no setting to control sound falloff in dehacked at all. That is a job for SNDINFO.

The lack of sound attenuation control feature becomes quite disturbing on maps with a lot of things emitting sounds at once.


I am pretty sure the syntax was as follows
Code:
Sound 16 //Simply SoundNum
Value = 45 // 0-255


So you can confirm that this is disabled ? If so I would learn something new. Gotta test.
Back to top
View user's profile Send private message Send e-mail
Krawa
Spamming!


Joined: 23 Nov 2008
Location: #SDA

PostPosted: Sat Oct 20, 2018 8:28 pm    Post subject: Reply with quote

Moved to accepted. ($volume, $attenuation and $rolloff)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Accepted / To be Implemented Requests All times are GMT + 1 Hour
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 © 2001, 2005 phpBB Group