Search Unity

Audio AudioClip plays at 100% volume, even without AudioListener

Discussion in 'Audio & Video' started by deLord, Feb 6, 2019.

  1. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    I have 2 problems that exist even if I start a new project in an old Unity version. No scripting, just having an object with AudioSource in the scene that is looped with an AudioClip on it.

    First:When there is no AudioListener, the sound will be played anyway
    Second: When the object is 600 units away from the AudioListener, the sound is still 100% volume.

    It looks as if the sound was just played raw. There is no consideration whatsoever concerning AudioListeners/-sources. Also, not using mixers.

    Using Unity 2018.3.3f1 (is this 2019.1 ? Cause I found that this bug was fixed in 2019.1 which doesnt seem to exist)
     
  2. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    help please :( what am I doing wrong here?
     
  3. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    328
    upload_2019-2-10_22-17-34.png

    did you set Spatial Blend to 3D?
     
    deLord likes this.
  4. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Uhm... Okay?! Now this had an effect.
    Wow, thanks a lot, I would never have found this. Can you tell me why I need to set it to 3D when I have a 2D game?
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
     
  6. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Hmm that didnt really help my understanding. So 2D means the sound will always be played, no matter the distance? What does "original channel mapping" mean here?
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    It means the audio track's left channel will come out of the left speaker and the right channel from the right speaker.

    2D in this context is more like "just play this audio as is". (without caring where the audio source is)