I have tried everything i can think of to fix the delay in my soundfx. Im running the game on galaxy s4 with android 4.3 and ether the sounds are super delayed or the game lags very badly. In total im only trying to load up 2 sounds at the moment on a level i would not consider very physics heavy. Im not sure what to do my game is about 80% complete but i can find a suitiable fix for this and its really holding up my release. Anyone have any suggestions?
I used this first because my soundfx are all under 3 seconds each and because it allows for more then 1 channel to be in use. My game becomes very laggy sounds are not very delayed but everything else is. Movment, buttons, animations and so on.
media.playEventSound( soundID )
Then i tried this and the lag goes away completely along with sound delay however this only allows for 1 channel to be in use at a time. My game requiers the ability to play more then just one sound at time.
media.playSound( soundID )
Next up was the newer audio api. The sound delay with this is so bad that when the user would press jump the player would hit the ground before the sound effect would play.
audio.loadSound() audio.loadStream()