public class FlacAudioFrame extends FlacFrame
Modifier and Type | Class and Description |
---|---|
protected static class |
FlacAudioFrame.SampleRate |
Modifier and Type | Field and Description |
---|---|
protected static int |
CHANNEL_TYPE_LEFT |
protected static int |
CHANNEL_TYPE_MID |
protected static int |
CHANNEL_TYPE_RIGHT |
Constructor and Description |
---|
FlacAudioFrame(byte[] data,
FlacInfo info) |
FlacAudioFrame(InputStream stream,
FlacInfo info)
Creates the frame from the stream, with header sync checking
|
FlacAudioFrame(int first2,
InputStream rawStream,
FlacInfo info)
Creates the frame from the pre-read 2 bytes and stream, no sync checks.
|
FlacAudioFrame(int byte1,
int byte2,
InputStream stream,
FlacInfo info)
Creates the frame from the pre-read 2 bytes and stream, with header sync checking
|
Modifier and Type | Method and Description |
---|---|
int |
getBitsPerSample()
Sample size in bits
|
int |
getBlockSize()
Block size in inter-channel samples
|
protected int |
getChannelType() |
long |
getCodedNumber()
If
isBlockSizeVariable() , then this is the
sample number, otherwise the frame number |
byte[] |
getData()
Returns the contents, including the sync header
|
int |
getNumChannels()
Number of channels
|
int |
getSampleRate()
Sample rate in Hz
|
FlacAudioSubFrame[] |
getSubFrames()
SubFrames hold the encoded audio data on a per-channel basis
|
boolean |
isBlockSizeVariable()
Is the block size fixed (frame header encodes the frame number)
or variable (frame header encodes the sample number)
|
static boolean |
isFrameHeaderStart(int first2) |
static boolean |
isFrameHeaderStart(int byte1,
int byte2) |
protected static final int CHANNEL_TYPE_LEFT
protected static final int CHANNEL_TYPE_RIGHT
protected static final int CHANNEL_TYPE_MID
public FlacAudioFrame(byte[] data, FlacInfo info) throws IOException
IOException
public FlacAudioFrame(InputStream stream, FlacInfo info) throws IOException
IOException
public FlacAudioFrame(int byte1, int byte2, InputStream stream, FlacInfo info) throws IOException
IOException
public FlacAudioFrame(int first2, InputStream rawStream, FlacInfo info) throws IOException
IOException
public static boolean isFrameHeaderStart(int byte1, int byte2)
public static boolean isFrameHeaderStart(int first2)
public byte[] getData()
public boolean isBlockSizeVariable()
public int getBlockSize()
public int getSampleRate()
public int getBitsPerSample()
public int getNumChannels()
protected int getChannelType()
public long getCodedNumber()
isBlockSizeVariable()
, then this is the
sample number, otherwise the frame numberpublic FlacAudioSubFrame[] getSubFrames()
Copyright © 2016. All rights reserved.