Audio plays even with paused AudioListener on frame 1

Through script I pause my scenes AudioListener on start, but I can hear the sounds of my game objects on the first frame of the game. Everything works on frame 2 and up. But I still hear sounds on frame 1.

It seems it does not register the “pause” set at start until frame 2. If I load the scene from another scene with a paused audio listener it works fine. But if I load the scene from a scene without a paused audio listener I hear sounds on frame 1.

Is this a recognized bug? I can’t find any info on it.

You should file a bug report.

In the meantime, try adding this to your AudioListener:

//Quick and dirty, not tested
public class Muter : Monobehaviour
{
      public bool mute = true;

      void OnAudioFilterRead( float[] data, int numChannels )
      {
           if( mute )
           {
                  System.Array.Clear( data, 0, data.Length );
           }
      }
}

It should also work on any AudioSource, though I wouldn’t see the point…

Cheers,

Gregzo