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