This is my first post here, so I'd like to give a huge thanks to the FBA Team!

I've made a very simple drum kit for my HTC Touch Pro Pocket PC. My idea is to tap on the different drums on the screen to play the matching sounds. It works snappy on Windows XP Pro but the Pocket PC version has too much latency or delay between the tap and the sound. It is high enough that the application really is unusable.
I've used 8 bit mono WAV files. I've tried running the program after a restart with all extra running programs (e.g. Manila) closed but it doesn't make any noticeable difference. Does anyone have suggestions on how to tune and optimize this so that the application will respond very quickly? Here is the code:
Code:
local background = loadimage("Image.png")
local hat = loadsound("Hat_8b_mono.wav")
local kick = loadsound("Kick_8b_mono.wav")
local snare = loadsound("Snare_8b_mono.wav")
function onmainloop()
if getnumiterations() < 1 then -- First loop
drawimage(background, 0, 0) -- Draw background image, with drum pictures and close button
end
-- Handle mousedown
if mousedown() == 1 then
if mousex() >= screenwidth() - 30 and mousey() >= 0 and mousex() <= screenwidth() and mousey() <= 29 then -- Clicked close button area
quit() -- Close application
elseif mousex() >= 18 and mousey() >= 158 and mousex() <= 250 and mousey() <= 275 then -- Clicked hat area
playsound(hat) -- Play hat sound clip
elseif mousex() >= 227 and mousey() >= 295 and mousex() <= 427 and mousey() <= 464 then -- Clicked kick area
playsound(kick) -- Play kick sound clip
elseif mousex() >= 440 and mousey() >= 173 and mousex() <= 629 and mousey() <= 346 then -- Clicked snare area
playsound(snare) -- Play snare sound clip
end
end
end