Sound: SoundShader – Arma 3
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}") |
Lou Montana (talk | contribs) m (Text replacement - "<syntaxhighlight lang="cpp">class" to "<syntaxhighlight lang="cpp"> class") |
||
Line 68: | Line 68: | ||
|} | |} | ||
<syntaxhighlight lang="cpp">class CfgSoundShaders | <syntaxhighlight lang="cpp"> | ||
class CfgSoundShaders | |||
{ | { | ||
class ACPC2_closeShot_SoundShader | class ACPC2_closeShot_SoundShader |
Revision as of 09:51, 25 May 2021
SoundShader
SoundShader is the lowest level of sound configuration. It contains the definition of sound files and basic set of parameters.
All SoundShaders have to be defined in the base class CfgSoundShaders.
For single SoundShader (SoundSet respectively), use sound files with the same sampling rate. |
parameter | unit/values | default | descriptions |
---|---|---|---|
sound | {["path/sound",p], ...} | none |
|
volume | float (0..n) or [dBFS] | 1 (= db0) |
|
frequency | (0.5..2) | 1 |
|
range | (0..n) [m] | 0 |
|
rangeCurve | {{d0, v0}, {d1, v1}, ... } or Class name | none |
|
limitation | bool | false |
|
class CfgSoundShaders
{
class ACPC2_closeShot_SoundShader
{
samples[] =
{
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_01", 1 },
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_02", 1 },
{ "A3\Sounds_F\arsenal\weapons\Pistols\Acpc2\ACPC2_closeShot_03", 2 } // example: sample has a higher chance of being picked
};
volume = db3; // additional gain, +3dB
range = 50;
rangeCurve = closeShotCurve; //classname of a curve, defined in cfgSoundCurves
};