I’m having another problem with consistency in my project. Sometimes when I call audio.Play() it plays the sound and othertimes it does not. When it does so seems to be completely random and I’m not trying to play the sound quickly. Also, I am not using any compression.
Are you playing the sounds off the same AudioSource object? If so, there is difference between playing them via Play() and PlayOneShot(). As the documentation says:
Multiple sounds can be played on one AudioSource using PlayOneShot.
Also, are your sounds mono or stereo? If they are stereo they will be heard regardless of the location of where they are played. If mono, then the location of the source and listener will be taken into account.
It can definitely matter. For example if you have your listener attached to the camera and moving around, the sound heard will be relative to the distance between where the sound is being played and where the listener is. This gives you the ability to add depth to your game via sound. If the sound is native stereo or forced to stereo upon input, then it will be heard in the same manner regardless of listener location and the source. Having said this, it sounds like your problem stems from trying to play multiple sounds over one another off the same audio source without using PlayOneShot(). Did you investigate whether this is the issue?
Not yet. I’ve been spending all day on optimization. The events are triggering though more now so I think the low FPS is causing a variety of problems, maybe even the sound one.