BlenderPlayer Audaspace audio glitch


I have a very annoying issue with Audaspace and BlenderPlayer.

First let me explain my “setup”, maybe the problem is in here:
I’m working with a pre-loaded sound dictionary, in other words, it loads all the sounds into a dictionary ( e.g. { “explosion” : aud.Factory.file(bge.logic.expandPath("//sounds/explode.wav")) } ). The dictionary is a global variable, so, it can be accessed from all the scripts, same thing with the aud.device ( bge.logic.device = aud.device() )

Now the problem:
When i open the generated runtime, the audio works very well on the menu screen, but in “game-time” it becomes glitchy and almost inaudible…

I made a video to show what happens:

My conclusion:
I saved the .EXE from the Menu.blend, and when i press “PLAY” it goes to another scene (Customize) inside the same .blend file. After the “Customize” scene, another .blend file is loaded (game) and the game starts.
I think the real problem is in game.blend, because the glitch starts when the game starts (as you can see in the video)…

So, what you guys think about this? I really need help, my game is finished, and i want to release it!! :confused:

Thanks. Sorry for bad english…

First off, that game looks really cool and professional, hopefully it can be released soon :D.

Do you have this problem with the sounds if you start directly from start.blend? I can’t think of why this would happen, other than the sound file being corrupt. Would you mind uploading the sound file so we can test it for problems?

Never experienced audio glitches like that with audaspace and I have a somewhat similar setup to yours apart from any scene changing. Bit hard to try and debug without seeing the script file for your maingame.blend that plays the sounds.

Possible things to try is buffering the sounds with audaspace (check the docs for that) it will save cpu cycles as maybe that’s whats causing the stutter like effect if your have a slow cpu and your playing many sounds. Another one is to make sure your using openal (best for the game engine)

Thanks @Spike1. Surprisingly not. I tried to save a runtime from the maingame, and the sound works perfectly in blenderplayer. It becomes glitchy only if i start it from the menu…

So, i’ve added the Buffer and it worked almost perfectly, but randomly, because the audio gets muted in some times. It always have a little clicks in the audio.
Here is the “glitchy” audio file:

Thanks for that @flame.

-------------------------- EDIT -----------------------------
I figured out that the problem is multiple devices, so i set the devices to None and now it’s working perfectly :smiley: