- Home /
Problem with Unity 4.1 - AudioSource.ignoreListenerPause not working?
It seems to me that the new field in AudioSource, ignoreListenerPause, is not working.
I've tried setting it to true on several Audiosources before setting AudioListener.pause to true, but the AudioSources with this new field set to true still stop playing.
Anyone else experiencing this problem?
Edit: Maybe a short summary of what the new field is supposed to do. If ignorListenerPause is true, the AudioSource is supposed to continue playing even though AudioListener.pause is true. Want to use for pausemenu. Link to unit reference: IgnoreListenerPause
Edit#2: Is there anyone who can try to use IgnoreListenerPause and see if its working for you? if it does, then I can at least stop looking for answers on the internet(there are none), and start rewriting the code....
IgnoreListenerPause isn't working for me either. Did you ever find a solution to this problem?
Answer by Suiko6272 · Mar 26, 2014 at 09:55 PM
Ok so the answer is the dumbest thing ever!!! You gotta do .Play() on the audio source after pausing. This means you need to keep track of every audiosource you do a .ignoreListenerPause instead of the engine doing it for you.
I set up the ignore in my AudioPlayer Singleton
backgroundMusic.ignoreListenerPause = true;
then in my pause script
m_oldTime = Time.timeScale; Time.timeScale = 0.0f;
AudioListener.pause = true; //Pauses all audio sources AudioListener.volume = 0.5f; S_AudioPlayer.Instance.BGMusic.Play(); //Reactivates if ignoring listener
Your answer
![](https://koobas.hobune.stream/wayback/20220613094712im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Mac built-in microphone stopped sending data to Unity. 0 Answers
Passing Audio to an Android service? 0 Answers
3d Sound not working? 1 Answer
[Not Fixed] Music doesent mute, please help 1 Answer
Audio volume problem? 2 Answers