self:set_attenuation_filter_db

Client

Sets the attenuation filter gain of the audio-3d instance


Syntax

local status = self:set_attenuation_filter_db(
    value
)

Parameters

TypeNameDescription
floatvalueGain in decibels applied by the distance attenuation filter
More negative values increase the high-frequency roll-off at distance

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Increase high-frequency roll-off with distance
local entity = core.audio_3d.create("sounds/ambient.ogg")

entity:set_attenuation_filter_db(-6.0)

On this page