rossturner / king-under-the-mountain

A simulation-based strategy game written in Java using LibGDX
MIT License
109 stars 17 forks source link

Minor: audio stutters when running in background #25

Open nanodeath opened 4 months ago

nanodeath commented 4 months ago

This is kind of a minor thing, but at least on Linux (Zorin), when alt-tabbing from the game to IntelliJ, the music keeps going, but stutters every second -- plays for half a second, stops playing for half a second, then repeats. Not something most people will care about, but...I have to mute every time I alt-tab to keep from going crazy.

It should either:

  1. not stutter, or
  2. pause music
nanodeath commented 4 months ago

https://github.com/libgdx/libgdx/blob/3f7fcb8599f956cc31ea2fa6982c4b3036524bb2/gdx/src/com/badlogic/gdx/Audio.java#L82-L83 suggests that the music is supposed to pause (option 2), so I'll look into that.