mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
[Mobile] set volume when track changes
This commit is contained in:
@@ -194,12 +194,6 @@ public class SoundSystem {
|
||||
changeBackgroundTrack();
|
||||
}
|
||||
|
||||
public void adjustVolume(float value) {
|
||||
if (currentTrack != null) {
|
||||
currentTrack.setVolume(value);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeBackgroundTrack() {
|
||||
//ensure old track stopped and disposed of if needed
|
||||
if (currentTrack != null) {
|
||||
@@ -228,6 +222,7 @@ public class SoundSystem {
|
||||
changeBackgroundTrack(); //change track when music completes on its own
|
||||
}
|
||||
});
|
||||
currentTrack.setVolume(FModel.getPreferences().getPrefInt(FPref.UI_VOL_MUSIC)/100f);
|
||||
} catch (final Exception ex) {
|
||||
System.err.println("Unable to load music file: " + filename);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user