madebykrol / Nostalgi2D

Nostalgi2D
1 stars 0 forks source link

Cannot loop ISound on android. #1

Open madebykrol opened 7 years ago

madebykrol commented 7 years ago

ISound instance cannot loop on android devices.. Works fine on desktop.


if(this.soundRef == null) {
   this.soundRef = this.sound.play(0f,
      1f, soundSystem.calculatePan(this.getPosition(), relativeToCheck.getPosition()));
      this.soundRef.setLooping(this.loop);
   }  else {
      this.soundRef.setPan(
         soundSystem.calculatePan(this.getPosition(), relativeToCheck.getPosition()),
         soundSystem.calculateVolume(this.radius, this.falloffDistance, this.getPosition(), relativeToCheck.getPosition()));
      this.soundRef.resume();
   }
}