self:update_fx
Client
Updates parameters of an existing audio effect on the audio-3d instance's effect chain
Syntax
local status = self:update_fx(
name,
parameters
)Parameters
| Type | Name | Description |
|---|---|---|
string | name | Name of the effect to update |
table | parameters | Parameters specific to the effect's type Only the supplied keys are changed; omitted keys retain their current value |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful update, false otherwise |
Examples
local entity = core.audio_3d.create("sounds/ambient.ogg")
entity:add_fx("my_reverb", core.audio_3d.effect.REVERB, {
room_size = 0.8,
wet = 0.5,
dry = 0.5
})
entity:update_fx("my_reverb", {
wet = 0.9,
dry = 0.1
})local entity = core.audio_3d.create("sounds/ambient.ogg")
entity:add_fx("my_eq", core.audio_3d.effect.EQ10, {
bands = { 0.0, 0.0, -3.0, -3.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0 }
})
entity:update_fx("my_eq", {
bands = { 0.0, 0.0, -6.0, -6.0, 0.0, 0.0, 4.0, 4.0, 0.0, 0.0 }
})