One thing to know about effects is that when you are using them, there exist two sound pathways - one direct and processed - and they are mixed at the output. Direct sound just comes from the source to the output. Processed sound goes from source through effect to the output.
Code: Select all
love.audio.setEffect ( "testeffect", { type = "echo" } )
source:setEffect ( "testeffect" )
This passes sound through an audio effect. There is a limit on how many effects can be active at a time, it is system dependant. If you delete an effect, make sure sources won't use it anymore as well.
Code: Select all
source:setFilter ( { type = "highpass", volume = 0.1, lowgain = 0.5 } )
This applies direct filter to the sound. This does not affects the sound that goes into an effect.
Code: Select all
source:setEffect ( "testeffect", { type = "lowpass", volume = 0.5, highgain = 0.1 } )
This applies a filter to the sound before passing it through an audio effect. This does not affects the direct sound from the source.
The idea is that some amount of sound goes directly from the source of sound to the listener, and some of it is secondary sound reflected off walls and whatnot. This is why these two sound paths are separate. You can adjust how much sound goes to the listener directly and effect processed by adjusting volume using filters. Using a filter is basically free so don't worry about the overhead.