| FBA The Creator http://www.fbacreator.com/fbaforum/ |
|
| Latency / delay in playing sounds http://www.fbacreator.com/fbaforum/viewtopic.php?f=5&t=214 |
Page 1 of 1 |
| Author: | kryptech [ Mon Aug 31, 2009 3:22 pm ] |
| Post subject: | Latency / delay in playing sounds |
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")
|
|
| Author: | evilmaio [ Tue Sep 01, 2009 8:33 am ] |
| Post subject: | Re: Latency / delay in playing sounds |
You could try moving your input logic inside mouse events instead of gameloop |
|
| Author: | kryptech [ Fri Sep 04, 2009 1:50 pm ] |
| Post subject: | Re: Latency / delay in playing sounds |
Thanks for the reply! Since my original post I've tried a couple variations. Is this what you meant? Code: local background = loadimage("Image.png")This performs with the same delay between the tap and playback. I tried using print() to output which drum had been hit and it appears to update very quickly, without the delay that is apparent with playsound(). So I tend to think the delay is due to the sound, not the input. But I'd have to test further to confirm that. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|