personally I tried mono, stereo, different kbps and khz, all will have delay.
I am testing on Redmi with Android OS’ Jelly Bean.
The delay happens on every button that triggers sound by touch.
media.playEventSound produces the same delay.
personally I tried mono, stereo, different kbps and khz, all will have delay.
I am testing on Redmi with Android OS’ Jelly Bean.
The delay happens on every button that triggers sound by touch.
media.playEventSound produces the same delay.
Then it sounds like one of two possibilities:
1. The codec for that audio type is causing the delay.
2. There is padding at the beginning of the sound.
media.playEventSound is the fastest way to play a sound and doesn’t suffer the “Android delay”. Are you pre-loading the sounds?
Rob
I noticed some lag when using .mp3 files on the Android. I changed it to WAV format and it worked better.
EDIT: Using media.newEventSound(“jump.mp3”) to load the sound and **media.playEventSound(jumpSound) **is working great without a noticeable delay on my devices. *Note* This sound only plays one time in the Corona simulator, and even has a small delay in the simulator - but after building it, it works fine on my Galaxy S4 without delay and I am able to call it as many times as I want.
Using audio.loadSound
Having this same issue with a 0.5+ second delay.
Testing on Galaxy S4, Nexus 7, and the new Verizon LG G2.
Delay:
*using wav and mp3 produces same lag
*wav set at 11khz, 41khz, and higher produces same results
*no dead space
I am going to keep playing around with it. Here is the code:
jumpSound = audio.loadSound("jump.wav") local jumpS = audio.play(jumpSound)
loadSound(“jump.wav”) is only called once, when the program initializes.
This works beautifully in the Corona Simulator, but when testing on devices, always produces 0.5+ second delay.
Are you measuring your start then calling audio.loadSound() and audio.play() back to back or are you preloading the sound and then starting your timer when the audio.play() statement?
Is there anymore info on this topic? I have the same issue on HTC One with 4.3 and have around just under .5 second lag. As this is a huge gap there must be something im doing wrong. Would bit rate and mono/stereo make this bug a difference on a device.
Im sing the classic “audio.loundSound” etc
personally I tried mono, stereo, different kbps and khz, all will have delay.
I am testing on Redmi with Android OS’ Jelly Bean.
The delay happens on every button that triggers sound by touch.
media.playEventSound produces the same delay.
Then it sounds like one of two possibilities:
1. The codec for that audio type is causing the delay.
2. There is padding at the beginning of the sound.
media.playEventSound is the fastest way to play a sound and doesn’t suffer the “Android delay”. Are you pre-loading the sounds?
Rob
I noticed some lag when using .mp3 files on the Android. I changed it to WAV format and it worked better.
EDIT: Using media.newEventSound(“jump.mp3”) to load the sound and **media.playEventSound(jumpSound) **is working great without a noticeable delay on my devices. *Note* This sound only plays one time in the Corona simulator, and even has a small delay in the simulator - but after building it, it works fine on my Galaxy S4 without delay and I am able to call it as many times as I want.
Using audio.loadSound
Having this same issue with a 0.5+ second delay.
Testing on Galaxy S4, Nexus 7, and the new Verizon LG G2.
Delay:
*using wav and mp3 produces same lag
*wav set at 11khz, 41khz, and higher produces same results
*no dead space
I am going to keep playing around with it. Here is the code:
jumpSound = audio.loadSound("jump.wav") local jumpS = audio.play(jumpSound)
loadSound(“jump.wav”) is only called once, when the program initializes.
This works beautifully in the Corona Simulator, but when testing on devices, always produces 0.5+ second delay.
Are you measuring your start then calling audio.loadSound() and audio.play() back to back or are you preloading the sound and then starting your timer when the audio.play() statement?