FileDocCategorySizeDatePackage
Mp4AlacBox.javaAPI DocJaudiotagger 2.0.43630Wed Mar 30 16:11:44 BST 2011org.jaudiotagger.audio.mp4.atom

Mp4AlacBox

public class Mp4AlacBox extends AbstractMp4Box
AlacBox ( Apple Lossless Codec information description box), Normally occurs twice, the first ALAC contaisn the default values, the second ALAC within contains the real values for this audio.

Fields Summary
public static final int
OTHER_FLAG_LENGTH
private int
maxSamplePerFrame
private int
unknown1
private int
sampleSize
private int
historyMult
private int
initialHistory
private int
kModifier
private int
channels
private int
unknown2
private int
maxCodedFrameSize
private int
bitRate
private int
sampleRate
Constructors Summary
public Mp4AlacBox(Mp4BoxHeader header, ByteBuffer dataBuffer)
DataBuffer must start from from the start of the body

param
header header info
param
dataBuffer data of box (doesnt include header data)

 // 32bit


                                    
        
    
        this.header     = header;
        this.dataBuffer = dataBuffer;
    
Methods Summary
public intgetBitRate()

        return bitRate;
    
public intgetChannels()

        return channels;
    
public intgetHistoryMult()

        return historyMult;
    
public intgetInitialHistory()

        return initialHistory;
    
public intgetKModifier()

        return kModifier;
    
public intgetMaxCodedFrameSize()

        return maxCodedFrameSize;
    
public intgetMaxSamplePerFrame()

        return maxSamplePerFrame;
    
public intgetSampleRate()

        return sampleRate;
    
public intgetSampleSize()

        return sampleSize;
    
public intgetUnknown1()

        return unknown1;
    
public intgetUnknown2()

        return unknown2;
    
public voidprocessData()

        //Skip version/other flags
        dataBuffer.position(dataBuffer.position() + OTHER_FLAG_LENGTH);

        maxSamplePerFrame   = Utils.readUBEInt32(dataBuffer);
        unknown1            = Utils.readUInt8(dataBuffer);
        sampleSize          = Utils.readUInt8(dataBuffer);
        historyMult         = Utils.readUInt8(dataBuffer);
        initialHistory      = Utils.readUInt8(dataBuffer);
        kModifier           = Utils.readUInt8(dataBuffer);
        channels            = Utils.readUInt8(dataBuffer);
        unknown2            = Utils.readUBEInt16(dataBuffer);
        maxCodedFrameSize   = Utils.readUBEInt32(dataBuffer);
        bitRate             = Utils.readUBEInt32(dataBuffer);
        sampleRate          = Utils.readUBEInt32(dataBuffer);                 
    
public java.lang.StringtoString()

        String s = "maxSamplePerFrame:" + maxSamplePerFrame
                    + "unknown1:"+ unknown1
                    + "sampleSize:"+sampleSize
                    + "historyMult:"+historyMult
                    + "initialHistory:"+initialHistory
                    + "kModifier:"+kModifier
                    + "channels:"+channels
                    + "unknown2 :"+unknown2
                    + "maxCodedFrameSize:"+maxCodedFrameSize
                    + "bitRate:"+bitRate
                    + "sampleRate:"+sampleRate;
        return s;