another attempt to better remedy song transition for visualizer

This commit is contained in:
Harrison Deng 2017-10-07 01:08:12 -05:00
parent 8cbefb1f0f
commit 67f9105922

View File

@ -39,15 +39,15 @@ public class VisualizerCore implements Disposable {
}
public void setMM(MusicManager mm) {
lock.lock();
if (audioPCM == null || audioPCM.length != mm.getReadWindowSize()) {
calc = false;
lock.lock();
fft = new FloatFFT_1D(mm.getReadWindowSize());
audioPCM = new float[mm.getReadWindowSize()];
lock.unlock();
}
this.mm = mm;
calc = true;
lock.unlock();
}
public void render(Batch batch, float parentAlpha) {