readFlacFrame
public static int readFlacFrame(java.io.InputStream inputStream,
BitStreamReader reader,
FlacStreamInfo streamInfo,
int[][] rawSampleBuffers,
short[][] sampleBuffers,
int[] temporaryBuffer)
throws java.io.IOException
Reads one frame, returning the number of samples written to sampleBuffers. A return value of 0 indicates that EOF
was reached in the frame, which happens when the track ends.
- Parameters:
inputStream - Input stream for reading the track
reader - Bit stream reader for the same underlying stream as inputStream
streamInfo - Global stream information
rawSampleBuffers - Intermediate sample decoding buffers. FlacStreamInfo#channelCount integer buffers of size
at least FlacStreamInfo#maximumBlockSize.
sampleBuffers - The sample buffers where the final decoding result is written to. FlacStreamInfo#channelCount
short buffers of size at least FlacStreamInfo#maximumBlockSize.
temporaryBuffer - Temporary working buffer of size at least TEMPORARY_BUFFER_SIZE. No state is held in this
between separate calls.
- Returns:
- The number of samples read, zero on EOF
- Throws:
java.io.IOException - On read error