fix spectrum to return a float buffer

This commit is contained in:
Brian Matzon 2004-09-27 15:17:05 +00:00
parent 4c631207c5
commit e0d47377c8
1 changed files with 2 additions and 5 deletions

View File

@ -3137,12 +3137,9 @@ public class FSound {
* @return FloatBuffer containing 512 floats
*/
public static FloatBuffer FSOUND_DSP_GetSpectrum() {
if(FMOD.fmodFFTBuffer == null) {
FMOD.fmodFFTBuffer = nFSOUND_DSP_GetSpectrum();
}
return FMOD.fmodFFTBuffer;
return nFSOUND_DSP_GetSpectrum().asFloatBuffer();
}
private static native FloatBuffer nFSOUND_DSP_GetSpectrum();
private static native ByteBuffer nFSOUND_DSP_GetSpectrum();
/**
* Allows the user to mix their own data from one buffer to another, using FSOUNDs optimized