Class MpegAudioUtil.Header

  • Enclosing class:

    public static final class MpegAudioUtil.Header
    extends Object
    Stores the metadata for an MPEG audio frame.
    • Field Detail

      • version

        public int version
        MPEG audio header version.
      • mimeType

        public String mimeType
        The MIME type.
      • frameSize

        public int frameSize
        Size of the frame associated with this header, in bytes.
      • sampleRate

        public int sampleRate
        Sample rate in samples per second.
      • channels

        public int channels
        Number of audio channels in the frame.
      • bitrate

        public int bitrate
        Bitrate of the frame in bit/s.
      • samplesPerFrame

        public int samplesPerFrame
        Number of samples stored in the frame.
    • Constructor Detail

      • Header

        public Header()
    • Method Detail

      • setForHeaderData

        public boolean setForHeaderData​(int headerData)
        Populates the fields in this instance to reflect the MPEG audio header in headerData, returning whether the header was valid. If false, the values of the fields in this instance will not be updated.
        headerData - Header data to parse.
        True if the fields were populated. False otherwise, indicating that headerData is not a valid MPEG audio header.