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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Background music ducked when game is launched

Discussion in 'Audio & Video' started by redstonegames, Sep 30, 2016.

  1. redstonegames

    redstonegames

    Joined:
    Sep 19, 2015
    Posts:
    11
    Whenever my game is launched, the background music being played on the device (e.g.: Spotify, iTunes, etc.) is ducked. This is undesired because my game does not have any fancy sound effects, I' like to allow my players to keep listening to their music in the 'normal' volume.

    For testing purposes I created an empty project in Unity3D, ensuring the Override iPad Musicsetting is unchecked in the iOS Build Settings. This is enough to reproduce the audio ducking issue.

    INFO:
    • Unity 5.4.x (also occurs with Unity 5.3.x)
    • Xcode 8
    • iOS 9 and iOS 10
    Does anyone know how disable Unity3D's default audio ducking?
    Note that my game still needs to reproduce sounds for simple click and score effects, video ads, etc.
     
  2. redstonegames

    redstonegames

    Joined:
    Sep 19, 2015
    Posts:
    11
  3. MattiasWargren

    MattiasWargren

    Joined:
    Jun 25, 2012
    Posts:
    10
    I have the same problem. No solution yet.
     
  4. redstonegames

    redstonegames

    Joined:
    Sep 19, 2015
    Posts:
    11
    Unity 5.4.2p1 introduced a 'Mute Other Audio Sources' setting in the Android Build Settings while the default behaviour is 'lower volume of the background audio instead of muting it'.

    This partially solves the problem but it generates a very annoying scenario to all users:
    1. User is listening to the background music and opens my game.
    2. Unity by default 'ducks' the background music. This means the user background music volume is low during GAMEPLAY.
    3. In order to better listen the background music, the user 'increases' the device's background music.
    4. The GAMEPLAY reaches a point in which an advertisement is shown. The game (Activity) loses focus and Unity increases the volume back to its original value. At this point a video ad is show with the volume extremely high.

    The scenario above results in an extremely annoying experience because users will hate even more the ads because the sound volume is really high when they are displayed. I think that this little 'details' affects user retention and Unity as a game engine should pay more attention to it.
     
    paradizIsCool likes this.
  5. Mukikaizoku

    Mukikaizoku

    Joined:
    Feb 21, 2016
    Posts:
    2
    @redstonegames I'm not sure if you noticed, but It appears that the issue that's causing the volume shifting on Android was fixed in Unity 5.5.2:

    "Android: Play audio from background applications at the original volume when it is not muted."

    I verified it was fixed in 5.5.3f1.