Also, AudioSource.ignoreListenerPause doesn’t work. When you set AudioListner.pause to true, audio sources with “ignoreListenerPause = true” will also be paused.
Seems both the pause and volume property of AudioListner is broken in Unity 4.2.:-?
If you have a central audio management you can simply control the volume by yourself (It was my case). If not, I think better simple to rollback to least unity3d working version.
And stay there until unity relases 4.3, so you can have sure that 4.2 become stable
Can confirm this is still in 4.2.1. Current workaround I’m using is just passing AudioListener.volume into the second parameter of PlayOneShot, as the value is right, it’s just not being applied properly behind the scenes I guess
Yep I get the same thing. Thanks for the workaround wallis2xk!
Also if there is a Unity guy watching this thread there is another issue with the audio introduced in Unity 4.2
The AudioListener.pause setting returns to false after the game regains focus when set to true before losing focus. To work around this I had to set the AudioListener.volume to 0 and in the first Update() after OnApplicationFocus( bool focus ) is called I return the volume to what it was and restore the pause state as well. It’s a bad hack but the only workaround I could think of for the time being.
Note: I had to set the volume = 0 in this hack because otherwise you get a split second of audio playback when your game regains focus. I also had to reset the pause state in the Update() function because it gets set to false after the OnApplicationFocus event so you cannot restore it there.