Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Question about muffling audio

Discussion in 'Audio & Video' started by FedeStefan, Aug 27, 2023.

  1. FedeStefan

    FedeStefan

    Joined:
    Aug 15, 2018
    Posts:
    221
    Hello everyone, I'd like to know if there is any way to muffle every audio audio source except multiple audio sources (I tried researching about audio mixer, but it looks way too janky to set up, and I don't want to add every audio there manually).

    Currently I'm working on a system where the player (since he's a passenger in the car) will hear everything clear inside the car, but any sounds outside the car gets muffled (by the low pass filter). And if hes outside the opposite happens. I have many ideas however I don't think they're ideal / optimized: one of them was where it gets every audio source (except for those inside the car) and adds a low pass filter, however it would take impact on performance.

    If anyone else knows any better way to do the idea I have, let me know! I appreciate any help / response or tip!
     
  2. FedeStefan

    FedeStefan

    Joined:
    Aug 15, 2018
    Posts:
    221
    Anybody willing to help?
     
  3. FedeStefan

    FedeStefan

    Joined:
    Aug 15, 2018
    Posts:
    221
    Anyone?
     
  4. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    290
    Hi!

    The first thing that comes to mind would be to make your sounds move to a different mixer group when going into the car. I imagine you won't have a lot of sound in the car so these could be handled one-by-one, but for the rest of your world, I'd put them all in a "Muffled" group once you get into the car and raise a lowpass filter. Same thing but backwards when you get out of the car, lower the lowpass filter then bring them back to your "Normal" mixer group.