About a year ago, when I first released my app Blocfall, I decided not to do an Android build because the audio didn’t work well. The sound effects I had linked to touch events lagged the visuals by about half a second, enough to make the game look bad.
On a recent app build I did for Kindle, the problem remains: The sound effects lag.
Is there a way to remedy this?
The lag does not happen on iOS builds and the audio .wav files are the same. The .wav effects files are also well trimmed so there’s no silence padding before the effect.
This doesn’t seem to be anything that can be optimized by better coding. The call to play the sound isn’t buried somewhere:
-- if 1 then remove block and show explosion
if enemyList[enemyID].val == 1 then
if (audioOn == 1) then
playSound(sounds.boomSound) --should play as explosion occurs but lags
end
enemyList[enemyID].val = 0
enemyList[enemyID].lock = 1
enemyList[enemyID].isVisible = false
local addScore = score()
points = points + addScore
-- display explosion
local ax = enemyList[enemyID].x
local ay = enemyList[enemyID].y
fire (ax, ay)
...
Is Android audio really so bad it can’t manage to play a simple sound effect without a delay? Or is there something I’m missing? A different audio format maybe? [import]uid: 1560 topic_id: 25513 reply_id: 325513[/import]
