Available since LÖVE 11.0
This function is not supported in earlier versions.
Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source.
success = Source:setFilter( settings )
table settingsFilterType typenumber volumenumber highgainnumber lowgainboolean successDisables filtering on this Source.
Source:setFilter( )
None.
Nothing.
function love.load()
local source = love.audio.newSource('music.ogg', 'stream')
source:setFilter {
type = 'lowpass',
volume = .5,
highgain = .4,
}
source:play()
end Audio filter functionality is not supported on iOS.
While the cutoff frequency cannot be set directly, changing high/lowgain has the effect of altering the cutoff. See it explained in this thread.
© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Source:setFilter