public final class FlacStreamInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
bitsPerSample |
int |
channels |
int |
maxBlockSize |
int |
maxFrameSize |
int |
minBlockSize |
int |
minFrameSize |
int |
sampleRate |
long |
totalSamples |
| Constructor and Description |
|---|
FlacStreamInfo(byte[] data,
int offset)
Constructs a FlacStreamInfo parsing the given binary FLAC stream info metadata structure.
|
FlacStreamInfo(int minBlockSize,
int maxBlockSize,
int minFrameSize,
int maxFrameSize,
int sampleRate,
int channels,
int bitsPerSample,
long totalSamples)
Constructs a FlacStreamInfo given the parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
bitRate()
Returns the bit-rate of the FLAC stream.
|
long |
durationUs()
Returns the duration of the FLAC stream in microseconds.
|
long |
getApproxBytesPerFrame()
Returns the approximate number of bytes per frame for the current FLAC stream.
|
long |
getSampleIndex(long timeUs)
Returns the sample index for the sample at given position.
|
int |
maxDecodedFrameSize()
Returns the maximum size for a decoded frame from the FLAC stream.
|
public final int minBlockSize
public final int maxBlockSize
public final int minFrameSize
public final int maxFrameSize
public final int sampleRate
public final int channels
public final int bitsPerSample
public final long totalSamples
public FlacStreamInfo(byte[] data,
int offset)
data - An array holding FLAC stream info metadata structureoffset - Offset of the structure in the arraypublic FlacStreamInfo(int minBlockSize,
int maxBlockSize,
int minFrameSize,
int maxFrameSize,
int sampleRate,
int channels,
int bitsPerSample,
long totalSamples)
minBlockSize - Minimum block size of the FLAC stream.maxBlockSize - Maximum block size of the FLAC stream.minFrameSize - Minimum frame size of the FLAC stream.maxFrameSize - Maximum frame size of the FLAC stream.sampleRate - Sample rate of the FLAC stream.channels - Number of channels of the FLAC stream.bitsPerSample - Number of bits per sample of the FLAC stream.totalSamples - Total samples of the FLAC stream.public int maxDecodedFrameSize()
public int bitRate()
public long durationUs()
public long getSampleIndex(long timeUs)
timeUs - Time position in microseconds in the FLAC stream.public long getApproxBytesPerFrame()