Exemplo n.º 1
0
 // Pressing the mouse stops and starts the sound
 public void mousePressed() {
   if (tone.isPlaying()) {
     tone.stop(); //   The sound can be stopped with the function stop().
   } else {
     tone.repeat();
   }
 }