So I am on an Intel Mac using LWJGL release 1.1.2, and I am creating a FMOD sound stream to play an MP3 file. I want to get the left/right level data from the channel that the stream is playing from using FSound.FSOUND_GetCurrentLevels().
So I make a stream object following the FMOD example on the website:
*load MP3 file into bytebuffer called data*
stream = FSound.FSOUND_Stream_Open(data, FSound.FSOUND_LOADMEMORY);
And I start playing this stream on channel 0. The loading and playing of the stream works because a half second or so of the song plays before the program crashes.
I have a global FloatBuffer called l_r that I create using FloatBuffer.allocate(2) (One float for each side, left and right).
Here is the code for testing GetCurrentLevels():
System.out.println("here we go...");
// Get the current levels for channel 0, place values in FloatBuffer l_r
here we go...
Invalid memory access of location 00000004 eip=127055a3
I tried putting the code in a try/catch to get a stack trace, but no dice. Any ideas? Thanks.