Esempio n. 1
0
 @Override
 public void play() {
   if (maximalInstances == 0 || instanceCounter.count() < maximalInstances) {
     if (!preventSimulaniousPlay || (preventSimulaniousPlay && !playing())) {
       super.play();
       instanceCounter.add(playingTime);
     }
   }
 }
Esempio n. 2
0
 @Override
 public void stop() {
   super.stop();
   instanceCounter.clear();
 }