The following implementation of the audio api reliably crashes my app when tapping the screen in rapid succession ( tap, tap, tap, tap, tap, tap ). I’m testing on a Nexus One running 2.3.3. The goal is for the loopSound to loop while your finger is down, and on release to stop playing the loop & play a quick sound. Is this an issue with the audio API, or my usage of it? Thanks
local function touchHandler( event )
if event.phase == ‘began’ then
audio.play( loopSound, { channel=1, loops=-1})
elseif event.phase == ‘ended’ then
audio.stop( 1 )
media.playEventSound( “quickSound.wav” )
end
end
display.getCurrentStage():addEventListener( ‘touch’, touchHandler ) [import]uid: 4596 topic_id: 7214 reply_id: 307214[/import]