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

Prevent Unity Android from lowering volume of the background audio

Discussion in 'Audio & Video' started by Shikshen, Nov 28, 2016.

  1. Shikshen

    Shikshen

    Joined:
    Feb 21, 2015
    Posts:
    24
    The latest version of Unity (5.4.3) fixed the following issue :

    "Android: By default lower volume of the background audio instead of muting it. (807983)"

    But the change is not much better than what it was before. We now have 1 star reviews from users who don't like that. Our game has very few sounds that don't interfere with background audio, and we don't want to disable them entirely just because of this "feature".

    Is there any way to avoid lowering the volume of the background audio?
     
  2. pndeveloper

    pndeveloper

    Joined:
    Dec 7, 2015
    Posts:
    29
    Seconding this question. Happy that launching our app no longer mutes/pauses the background audio, but would prefer to leave leave the volume alone...

    Also, there are multiple problems with lowering the volume like:
    1. When listening to Play Music, the volume goes back to the system level when changing tracks.
    2. If the music is paused and resumed, the volume goes back to the system level.
    3. If anything triggers a system dialog (like an in-app purchase) the volume goes up and down (up while the system dialog is displayed and back down when it is closed).

    Seems like the best way to fix all those issues would be simply not lowering the volume.
     
  3. yurykorzun

    yurykorzun

    Joined:
    Oct 29, 2015
    Posts:
    41
    We are experiencing this problem with the most recent 5.4 version of Unity. Something was changed in the way Unity manages the audiofocus and there is no way to configure that. Is it related to the addition of the "Mute other audio sources" button to the android player configuration? Before the recent changes everything worked well.
     
    themartorana likes this.
  4. MartinGiaco

    MartinGiaco

    Joined:
    Jul 24, 2013
    Posts:
    11
  5. Mukikaizoku

    Mukikaizoku

    Joined:
    Feb 21, 2016
    Posts:
    2
    @Daimas @dppc @yurykorzun @MartinGiaco 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.