Search Issue Tracker

Fixed in 5.5.0

Votes

65

Found in

5.3.6p4

Issue ID

828762

Regression

Yes

[iOS] Sound volume of music playing on the device gets quiet after launching a Unity app

iOS

-

When a Unity app is launched, any audio playing on the device (iTunes, Spotify, etc.) gets quiet, even when the app is not playing any sounds. This issue does not occur when 'Disable Unity Audio' is checked in Edit > Project Settings > Audio. When the app goes back to background or is exited, the sound goes back to normal.

Steps to reproduce:
1) Create a new project.
2) Build for iOS.
3) Play music on a device.
4) Launch the build on the device.

As soon as the app starts, the sound volume is halved.

Reproduced on:
5.5.0b2, 5.4.0p4, 5.3.6p4

Did not reproduce:
5.2.4f1

Comments (38)

  1. 08ea81b66af2eb6ca4f93381cd1674ee?d=mm

    alect

    Nov 07, 2016 18:46

    @lanestp your code workaround seems to work great on my iPhone 5S running 10.0.1, but on my iPad Mini 2 running 9.3.2 I get the following error and no audio plays at all (this error does not appear and audio works fine without the AudioFix plugin):

    ERROR: [0x19faba000] AVAudioSessionUtilities.h:111: GetProperty: AudioSessionGetProperty ('aiav') failed with error: '!ini'
    ERROR: [0x19faba000] AVAudioSessionUtilities.h:124: GetProperty_DefaultToZero: AudioSessionGetProperty ('aiav') failed with error: '!ini'
    FMOD failed to initialize the output device, attempting to initialize the null output.

    I'm not super familiar with what your code is doing, so I was wondering if you have any insights about how to fix that? Thanks either way!

  2. F0dded27025f0fe56bc3a827a18cfdaa?d=mm

    lanestp

    Nov 04, 2016 02:42

    Morgan - inside your project directory inside assets Create a Plugins directory and inside that creat an iOS directory

    http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder

  3. 8c06310c537108165b451a89282e56ce?d=mm

    Morgan

    Nov 03, 2016 14:53

    p2 and p3 have been released, still with no fix apparently. Any further details on a workaround would be great!

  4. 8c06310c537108165b451a89282e56ce?d=mm

    Morgan

    Oct 24, 2016 16:33

    Patch 5.4.2p1 is out but no mention of this being fixed :( It's over a year since I've been able to ship an update to my app due to one shipstopper bug overlapping another :(

  5. 8c06310c537108165b451a89282e56ce?d=mm

    Morgan

    Oct 21, 2016 21:35

    Thanks, LaneSTP! What's the path to Plugins/iOS? Maybe I need to create it? (There's no Plugins folder in either the Unity project or the Xcode project.)

    Any need to then call/reference/select the created file? Or is its existence enough?

  6. F0dded27025f0fe56bc3a827a18cfdaa?d=mm

    lanestp

    Oct 21, 2016 02:15

    For everyone trying to fix this issue just create a AudioFix.mm file in Plugins/iOS/ and copy paste the code in there

  7. 8c1639b8233efb793b8b7aa4522aaf5a?d=mm

    lEscargotl

    Oct 12, 2016 22:42

    @lanestp I guess you need to buy the UIKit plugin ($25) for that fix?

  8. 8c1639b8233efb793b8b7aa4522aaf5a?d=mm

    lEscargotl

    Oct 12, 2016 22:14

    @lanestp Can you explain what "Just include this code in your plugin." means? If I copy-paste that code, where should it go?

  9. 8c06310c537108165b451a89282e56ce?d=mm

    Morgan

    Oct 09, 2016 22:41

    Same thing in 5.4.1p4 also. The workarounds mentioned are greek to me—any tips?

    My app has been waiting a year without an update because of one ship-stopper bug after another in the Unity engine :( I fear my users won't have that much patience. Unity 5.3 has one bug, requiring 5.4 to fix... but 5.4 has this bug! I have to pick which bug to add to my app or I can't update it.

  10. 8c06310c537108165b451a89282e56ce?d=mm

    Morgan

    Oct 04, 2016 00:21

    Same here - my project never had "Prepare for iOS Recording" selected (nor "Override iPod Music") but when I went from Unity 5.3 to 5.4, I now see this problem on all devices and OS versions. Music app is affected, and so are third-party audio apps (like Overcast for podcasts).

    My app is a productivity app that people will use while "doing whatever"--like phone calls, podcasts, and music, so this annoyance is a dealbreaker. Users will complain!

    The problem persists as of at least 5.4.1p3 (the latest).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.