Android Audio Problem - Need Help

Hi,

I’m developing a game where my main character is collecting fruits / points and I want to play a short audio when each fruit is collected.

The problem is that I get an approximately 0.5 second delay on Android when playing that audio and it is very annoying.

I tried the new audio API and the old one (media.playEventSound) but the result is the same.

local crashSound = media.newEventSound( "music/crash.ogg" )  
local playCrash = function()  
 media.playEventSound( crashSound )  
end  

Pls advise… [import]uid: 159657 topic_id: 29199 reply_id: 329199[/import]

Later I just call playCrash() in my onHit(event) function.

Please help a newbie :slight_smile:

Daniel
[import]uid: 159657 topic_id: 29199 reply_id: 117547[/import]

I’m experiencing the same problem on Android devices.

Using both new audio API and old media API, I get lags on event (short) sounds.

Corona Staff or Android developers, please advise… [import]uid: 177091 topic_id: 29199 reply_id: 125819[/import]

just brain storming here… but you may want to consider using audio.loadstream…

you can control its buffer size, and maybe preloading it in the buffer and playing once (with no volume) before actual game play - could help [import]uid: 9070 topic_id: 29199 reply_id: 125838[/import]

Android audio lags. Period. And there is nothing Corona Labs can do about it. Hopefully Ice Cream Sandwich will be better but for all of those 2.2, 2.3, 3.x folks out there (including the Kindle Fires, and Nooks – non HD models) have to live with laggy audio.

[import]uid: 19626 topic_id: 29199 reply_id: 125839[/import]

I guess I’m gonna go with no event sounds in Android then.

However, I have read somewhere on Corona forum that this should work for Android:
http://docs.coronalabs.com/api/library/media/newEventSound.html
So I’ve tested it on Kindle Fire but it still lags. [import]uid: 177091 topic_id: 29199 reply_id: 125840[/import]

I’m experiencing the same problem on Android devices.

Using both new audio API and old media API, I get lags on event (short) sounds.

Corona Staff or Android developers, please advise… [import]uid: 177091 topic_id: 29199 reply_id: 125819[/import]

just brain storming here… but you may want to consider using audio.loadstream…

you can control its buffer size, and maybe preloading it in the buffer and playing once (with no volume) before actual game play - could help [import]uid: 9070 topic_id: 29199 reply_id: 125838[/import]

Android audio lags. Period. And there is nothing Corona Labs can do about it. Hopefully Ice Cream Sandwich will be better but for all of those 2.2, 2.3, 3.x folks out there (including the Kindle Fires, and Nooks – non HD models) have to live with laggy audio.

[import]uid: 19626 topic_id: 29199 reply_id: 125839[/import]

I guess I’m gonna go with no event sounds in Android then.

However, I have read somewhere on Corona forum that this should work for Android:
http://docs.coronalabs.com/api/library/media/newEventSound.html
So I’ve tested it on Kindle Fire but it still lags. [import]uid: 177091 topic_id: 29199 reply_id: 125840[/import]