minor cleanup

This commit is contained in:
Harrison Deng 2017-07-11 18:04:40 -05:00
parent 897f802885
commit f1b0a2b20e
4 changed files with 7 additions and 9 deletions

View File

@ -284,8 +284,8 @@ public class AudioAnalyzer {
}
public void runThresholdCleaning(float rangeModifier) {
this.bassThresholdMultiplier /= rangeModifier;
this.umThresholdMultiplier /= rangeModifier;
this.bassThresholdMultiplier -= rangeModifier;
this.umThresholdMultiplier -= rangeModifier;
work = true;
Thread thresholdClean = new Thread(thresholdCalculator);
thresholdClean.start();

View File

@ -69,7 +69,7 @@ public class GamePlayMap {
/**
* use this to add rest for current index position
*/
public void addRestToMap() {
public void addNullToMap() {
if (building) {
spawnList.add(null);
}

View File

@ -67,8 +67,9 @@ public class RhythmMapAlgorithm implements Runnable {
speedMod*(Polyjet.GAME_AREA_HEIGHT/3)/avgBPS);
}
}
} else {
map.addRestToMap();
map.addNullToMap();
}
progress = (int) (100f*index/bassPeaks.size);

View File

@ -85,9 +85,6 @@ public class AnalyzePage extends Page implements MiniListener {
@Override
public void changed(ChangeEvent event, Actor actor) {
speedModifierTitle.setText("Speed Modifier: " + speedModifier.getValue());
if (audioAnalyzer.containsData()) {
audioAnalyzer.runThresholdCleaning(sensitivityRating.getValue());
}
}
});
speedModifierTitle = new Label("Speed Modifier: " + speedModifier.getValue(), skin, "sub-font", skin.getColor("default"));
@ -109,7 +106,7 @@ public class AnalyzePage extends Page implements MiniListener {
healthModifierTitle = new Label("Health modifier: " + healthModifier.getValue(), skin, "sub-font", skin.getColor("default"));
difficultyTable.add(healthModifierTitle);
difficultyTable.row();
difficultyTable.add(healthModifier).fillX();
difficultyTable.add(healthModifier).fillX().spaceBottom(15f);
difficultyTable.row();
@ -121,7 +118,7 @@ public class AnalyzePage extends Page implements MiniListener {
info[2].setText("Confirmed.");
confirmed = true;
confirmDiffButton.setDisabled(true);
if (audioAnalyzer.containsData()) {
if (audioAnalyzer.containsData() ) {
finalizeData();
}
}