Class FlacStreamInfo


  • public class FlacStreamInfo
    extends java.lang.Object
    FLAC stream info metadata block contents. Field descriptions are from: https://xiph.org/flac/format.html#metadata_block_streaminfo

    FLAC 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.

    • Constructor Summary

      Constructors 
      Constructor Description
      FlacStreamInfo​(byte[] blockData, boolean hasMetadataBlocks)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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.
    • Constructor Detail

      • FlacStreamInfo

        public FlacStreamInfo​(byte[] blockData,
                              boolean hasMetadataBlocks)
        Parameters:
        blockData - The raw block data.
        hasMetadataBlocks - Whether the file has any metadata blocks after the stream info.