attempt at fixing discrepancy between spectrum and actual data

This commit is contained in:
Harrison Deng 2018-09-10 01:32:49 -05:00
parent d07ecc32f8
commit 9febf7ba15

View File

@ -9,6 +9,7 @@ import java.text.DecimalFormat;
import java.util.Observable;
import java.util.Observer;
import org.lwjgl.openal.AL;
import org.lwjgl.openal.AL11;
import com.badlogic.gdx.Gdx;
@ -133,6 +134,9 @@ public class PCMObtainer implements Observer, PCMSystem {
String millisPerWindowF = df.format(windowSize/(float) sampleRate);
millisPerWindow = (long) (Float.valueOf(millisPerWindowF)*1000);
songChanged = true;
intermediateBuffer.clear();
playingBuffer.clear();
begin();
}