Search Unity

Low pass filter (AudioLowPassFilter) on Listener not functioning properly

Discussion in 'Audio & Video' started by skarik, Sep 24, 2015.

  1. skarik

    skarik

    Joined:
    Jan 4, 2015
    Posts:
    3
    Code (csharp):
    1. // Set cutoff frequency to something low that we'll be able to hear
    2. _filter.cutoffFrequency = 200.0f;
    3.  
    4. // That didn't work. Let's just go through the keys!
    5. for (int i = 0; i < _filter.customCutoffCurve.keys.Length; ++i)
    6.   _filter.customCutoffCurve.keys[i].value = _filter.cutoffFrequency;
    7.  
    8. // That still didn't work. Send help.
    Am I dumb? For some reason

    don't do a thing.

    High pass works great, though!

    It does work with the audio mixer. And the audio source. And the audio grinder, audio grater, and audio cutting board, just not the audio listener.

    Is this a thing? Can other people verify?

    Thank you!
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Those go on Audio Source components. I don't think they affect Audio Listener components. Never tried it though.
     
  3. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds like time to submit a bug.
     
  5. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Did that last week, #732854.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Awesome. I'm eager to use this feature when it works again :)
     
  7. aayars

    aayars

    Joined:
    May 15, 2008
    Posts:
    46
    Last edited: Oct 10, 2015
  8. roger0

    roger0

    Joined:
    Feb 3, 2012
    Posts:
    1,208
    Its still not fixed.. The low pass filter doesn't do anything to the audio listener.

    I have an underwater scene and it would be great to just have all sound effects be automatically muffled when the player goes underwater, instead of having to apply something to every single audiosource.
     
  9. TheUbMunster

    TheUbMunster

    Joined:
    Nov 8, 2018
    Posts:
    8
    I found a solution that works for me; just make sure the AudioLowPassFilter is ABOVE the listener on the component hierarchy. (Drag and drop the component so it's above the listener).