예제 #1
0
 public void updateVolume(float volume) {
   if (isPlaying()) {
     float effectiveVolume = volume * _volume;
     if (effectiveVolume > 0) sound.setVolume(effectiveVolume);
     else sound.stop();
   }
 }
예제 #2
0
 @Override
 public void release() {
   if (sound != null) {
     if (sound.isPlaying()) sound.stop();
     sound.release();
     sound = null;
   }
 }