Sound: cfgSoundCurves – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>" to "<code style="display: block">")
m (Some wiki formatting)
 
Line 1: Line 1:
====CfgSoundCurves====
== CfgSoundCurves ==
Instead of having to define many points every time you need to define a curve (for example for the rangeCurve in a SoundShader) you can use the class CfgSoundCurves to define specific sound curves and then just use the names of these soundCurves in your sound configurations. Let's look at an example CfgSoundCurves entry:
 
<code style="display: block">class CfgSoundCurves
Instead of having to define many points every time you need to define a curve (for example for the rangeCurve in a SoundShader) you can use the class CfgSoundCurves to define specific sound curves and then just use the names of these soundCurves in your sound configurations.
 
Let's look at an example CfgSoundCurves entry:
 
<syntaxhighlight lang="cpp">
class CfgSoundCurves
{
{
class closureVolumeCurve
class closureVolumeCurve
{
{
points[] =  
points[] =
{
{
{0.0,1.0},
{ 0.0, 1.0 },
{0.5,0.7},
{ 0.5, 0.7 },
{1.0,0.0}
{ 1.0, 0.0 }
};
};
};
};
};</code>
};
This entry uses relative distance values (0=0m, 1=maximum range) and is called "closureVolumeCurve". So in an example SoundShader we can use: '''rangeCurve = closureVolumeCurve''' because we have defined it in cfgSoundCurves.
</syntaxhighlight>
 
This entry uses relative distance values (0 = 0m, 1 = maximum range) and is called "closureVolumeCurve".
So in an example SoundShader we can use: '''rangeCurve = closureVolumeCurve''' because we have defined it in cfgSoundCurves.
 
 
{{GameCategory|arma3|Sound}}

Latest revision as of 00:45, 25 April 2023

CfgSoundCurves

Instead of having to define many points every time you need to define a curve (for example for the rangeCurve in a SoundShader) you can use the class CfgSoundCurves to define specific sound curves and then just use the names of these soundCurves in your sound configurations.

Let's look at an example CfgSoundCurves entry:

class CfgSoundCurves
{
	class closureVolumeCurve
	{
		points[] =
		{
			{ 0.0, 1.0 },
			{ 0.5, 0.7 },
			{ 1.0, 0.0 }
		};
	};
};

This entry uses relative distance values (0 = 0m, 1 = maximum range) and is called "closureVolumeCurve". So in an example SoundShader we can use: rangeCurve = closureVolumeCurve because we have defined it in cfgSoundCurves.