We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › using paly method for play by mouse click
Page Index Toggle Pages: 1
using paly method for play by mouse click (Read 543 times)
using paly method for play by mouse click
Nov 15th, 2006, 9:08pm
 
hello!
I'm going to use mouse button for clicking and making a sound, but one problem  appears when i hold the right button
the soud plays noisy and then when i release it ,it play correctly.
my quastion is, how could i control the playing without this problem?

and another question is,when i use movemouse() method it executes with delay ,it does not play correspond to mouse motion ,for example when i move it from inside to outside of a image  after delay it plays,how can i solve it?
thanks
cyrous
Re: using paly method for play by mouse click
Reply #1 - Nov 15th, 2006, 9:53pm
 
I think your problem will be because you keep on starting the sound, over and over whilst the mouse is being held.

You will probably need to keep track of whether the sound has already been started recently, and if so, don't start playing again.
Page Index Toggle Pages: 1