multiple order changes with notifiers and other method calls; added
copying of default music file to special directory;
This commit is contained in:
@@ -63,6 +63,7 @@ public class PCMObtainer implements Observer, Disposable, PCMSystem {
|
||||
PCM[sid] = chanVal;
|
||||
}
|
||||
}
|
||||
System.out.println(PCM[0]);
|
||||
PCM[sid] /= Short.MAX_VALUE + 1f;
|
||||
}
|
||||
|
||||
@@ -140,7 +141,7 @@ public class PCMObtainer implements Observer, Disposable, PCMSystem {
|
||||
@Override
|
||||
public float[] getFrequencyBins() {
|
||||
if (updated) {
|
||||
synchronized (PCM) {
|
||||
synchronized (this) {
|
||||
fft.fft(PCM);
|
||||
System.arraycopy(PCM, 1, frequencyBins, 0, frequencyBins.length);
|
||||
}
|
||||
|
@@ -268,11 +268,7 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
|
||||
@Override
|
||||
public void update(Observable o, Object arg) {
|
||||
if (o == mc && arg.equals(mc.states.LOADED)) {
|
||||
if (selectables.getChecked().getFileHandle() != mc.getCurrentMusicFileHandle()) {
|
||||
selectables.setChecked(mc.getCurrentlyPlayingIndex());
|
||||
}
|
||||
} else if (o == mmc) {
|
||||
if (o == mmc) {
|
||||
thread.start();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user