{{newin|[[11.0]]|110|type=function}}
Applies an audio [[EffectType|effect]] to the Source.

The effect must have been previously defined using [[love.audio.setEffect]].

== Function ==
Applies the given previously defined effect to this Source.
=== Synopsis ===
<source lang="lua">
success = Source:setEffect( name, enable )
</source>
=== Arguments ===
{{param|string|name|The name of the effect previously set up with [[love.audio.setEffect]].}}
{{param|boolean|enable (true)|If false and the given effect name was previously enabled on this Source, disables the effect.}}
=== Returns ===
{{param|boolean|success|Whether the effect was successfully applied to this Source.}}

== Function ==
Applies the given previously defined effect to this Source, and applies a [[Source:setFilter|filter]] to the Source which affects the sound fed into the effect.
=== Synopsis ===
<source lang="lua">
success = Source:setEffect( name, filtersettings )
</source>
=== Arguments ===
{{param|string|name|The name of the effect previously set up with [[love.audio.setEffect]].}}
{{param|table|filtersettings|The filter settings to apply prior to the effect, with the following fields:}}
{{subparam|FilterType|type|The type of filter to use.}}
{{subparam|number|volume|The overall volume of the audio. Must be between 0 and 1.}}
{{subparam|number|highgain|Volume of high-frequency audio. Only applies to low-pass and band-pass filters. Must be between 0 and 1.}}
{{subparam|number|lowgain|Volume of low-frequency audio. Only applies to high-pass and band-pass filters. Must be between 0 and 1.}}
=== Returns ===
{{param|boolean|success|Whether the effect and filter were successfully applied to this Source.}}

== Notes ==
Audio effect functionality is not supported on iOS.

== See Also ==
* [[parent::Source]]
* [[Source:getEffect]]
* [[Source:setFilter]]
* [[love.audio.setEffect]]
[[Category:Functions]]
{{#set:Description=Applies an audio [[EffectType|effect]] to the Source.}}
== Other Languages ==
{{i18n|Source:setEffect}}