Skip to content

Filters

Hangman edited this page Jul 3, 2023 · 6 revisions

Filters provide a simple way to filter out high or low frequencies.
This is what the sound path would look like if both possible filter types were active:


sound path


Direct Filters

In this example, the low frequencies are played with a volume of 50%, high frequencies are at 30%.

soundSource.setFilter(0.5f, 0.3f);

Effect Filters

It's also possible to apply a filter to an effect instead of the source directly:

SoundEffect effect = new SoundEffect(EaxReverb.domeSaintPauls());
soundSource.attachEffect(effect, 1f, 0.3f);