Page 2 of 2

Re: Event Handler with some keys

Posted: Sat Sep 10, 2011 3:18 pm
by Zandi
jalih wrote: Not sure, if this is what you want but try this:
It is exactly what I was looking for. :)
I don't know why on my Sam440 the CPU usage is 100%.

I tried to modify your code and give more samples but I had to do something wrong because it still plays only one sample.
Could you write me the code for two samples, please. (I need to add 20 sample at least to my program). Thank you for your answer.

Re: Event Handler with some keys

Posted: Tue Sep 13, 2011 9:03 am
by airsoftsoftwair
The CPU goes to 100% because there's nothing that prevents the loop from running at maximum speed. Try to insert a VWait() before the Forever to reduce iteration speed to that of the monitor refresh rate.