I got the following error while running project.Can anyone help me??
java.lang.ClassCastException: java.nio.ByteBufferAsShortBuffer cannot be cast to java.nio.FloatBuffer
Here is my code:
Buffer[] samples = frame.samples;
if (aaD.track.getChannelCount() == 1)
//For using with mono track
{
Buffer b = samples[0];
fb = ((ByteBuffer) b.rewind()).asFloatBuffer();//here is error
fb.rewind();
smpls = new float[fb.capacity()];
fb.get(smpls);
}
Please help