Class FlacStreamInfo
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.flac.FlacStreamInfo
-
public class FlacStreamInfo extends java.lang.ObjectFLAC stream info metadata block contents. Field descriptions are from: https://xiph.org/flac/format.html#metadata_block_streaminfoFLAC specifies a minimum block size of 16 and a maximum block size of 65535, meaning the bit patterns corresponding to the numbers 0-15 in the minimum blocksize and maximum blocksize fields are invalid.
-
-
Field Summary
Fields Modifier and Type Field Description intbitsPerSampleFLAC supports from 4 to 32 bits per sample.intchannelCountFLAC supports from 1 to 8 channelsbooleanhasMetadataBlocksWhether the file has any metadata blocks after the stream info.static intLENGTHintmaximumBlockSizeThe maximum block size (in samples) used in the stream.intmaximumFrameSizeThe maximum frame size (in bytes) used in the stream.byte[]md5SignatureMD5 signature of the unencoded audio data.intminimumBlockSizeThe minimum block size (in samples) used in the stream.intminimumFrameSizeThe minimum frame size (in bytes) used in the stream.longsampleCountTotal samples in stream.intsampleRateSample rate in Hz.
-
Constructor Summary
Constructors Constructor Description FlacStreamInfo(byte[] blockData, boolean hasMetadataBlocks)
-
-
-
Field Detail
-
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
-
minimumBlockSize
public final int minimumBlockSize
The minimum block size (in samples) used in the stream.
-
maximumBlockSize
public final int maximumBlockSize
The maximum block size (in samples) used in the stream. (Minimum blocksize == maximum blocksize) implies a fixed-blocksize stream.
-
minimumFrameSize
public final int minimumFrameSize
The minimum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
-
maximumFrameSize
public final int maximumFrameSize
The maximum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
-
sampleRate
public final int sampleRate
Sample rate in Hz. Though 20 bits are available, the maximum sample rate is limited by the structure of frame headers to 655350Hz. Also, a value of 0 is invalid.
-
channelCount
public final int channelCount
FLAC supports from 1 to 8 channels
-
bitsPerSample
public final int bitsPerSample
FLAC supports from 4 to 32 bits per sample. Currently the reference encoder and decoders only support up to 24 bits per sample.
-
sampleCount
public final long sampleCount
Total samples in stream. 'Samples' means inter-channel sample, i.e. one second of 44.1Khz audio will have 44100 samples regardless of the number of channels. A value of zero here means the number of total samples is unknown.
-
md5Signature
public final byte[] md5Signature
MD5 signature of the unencoded audio data. This allows the decoder to determine if an error exists in the audio data even when the error does not result in an invalid bitstream.
-
hasMetadataBlocks
public final boolean hasMetadataBlocks
Whether the file has any metadata blocks after the stream info.
-
-