Coverage Report - org.jaudiotagger.tag.id3.framebody.FrameBodyEQU2
 
Classes in this File Line Coverage Branch Coverage Complexity
FrameBodyEQU2
0%
0/9
N/A
1
 
 1  
 /**
 2  
  *  @author : Paul Taylor
 3  
  *  @author : Eric Farng
 4  
  *
 5  
  *  Version @version:$Id: FrameBodyEQU2.java,v 1.14 2008/07/21 10:45:42 paultaylor Exp $
 6  
  *
 7  
  *  MusicTag Copyright (C)2003,2004
 8  
  *
 9  
  *  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
 10  
  *  General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
 11  
  *  or (at your option) any later version.
 12  
  *
 13  
  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 14  
  *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 15  
  *  See the GNU Lesser General Public License for more details.
 16  
  *
 17  
  *  You should have received a copy of the GNU Lesser General Public License along with this library; if not,
 18  
  *  you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
 19  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 20  
  *
 21  
  * Description:
 22  
  *
 23  
  */
 24  
 package org.jaudiotagger.tag.id3.framebody;
 25  
 
 26  
 import org.jaudiotagger.tag.InvalidTagException;
 27  
 import org.jaudiotagger.tag.datatype.ByteArraySizeTerminated;
 28  
 import org.jaudiotagger.tag.datatype.DataTypes;
 29  
 import org.jaudiotagger.tag.id3.ID3v24Frames;
 30  
 
 31  
 import java.nio.ByteBuffer;
 32  
 
 33  
 
 34  
 /**
 35  
  * Equalisation (2)
 36  
  * <p/>
 37  
  * This is another subjective, alignment frame. It allows the user to
 38  
  * predefine an equalisation curve within the audio file. There may be
 39  
  * more than one "EQU2" frame in each tag, but only one with the same
 40  
  * identification string.
 41  
  * <p/>
 42  
  * <Header of 'Equalisation (2)', ID: "EQU2">
 43  
  * Interpolation method  $xx
 44  
  * Identification        <text string> $00
 45  
  * <p/>
 46  
  * The 'interpolation method' describes which method is preferred when
 47  
  * an interpolation between the adjustment point that follows. The
 48  
  * following methods are currently defined:
 49  
  * <p/>
 50  
  * $00  Band
 51  
  * No interpolation is made. A jump from one adjustment level to
 52  
  * another occurs in the middle between two adjustment points.
 53  
  * $01  Linear
 54  
  * Interpolation between adjustment points is linear.
 55  
  * <p/>
 56  
  * The 'identification' string is used to identify the situation and/or
 57  
  * device where this adjustment should apply. The following is then
 58  
  * repeated for every adjustment point
 59  
  * <p/>
 60  
  * Frequency          $xx xx
 61  
  * Volume adjustment  $xx xx
 62  
  * <p/>
 63  
  * The frequency is stored in units of 1/2 Hz, giving it a range from 0
 64  
  * to 32767 Hz.
 65  
  * <p/>
 66  
  * The volume adjustment is encoded as a fixed point decibel value, 16
 67  
  * bit signed integer representing (adjustment*512), giving +/- 64 dB
 68  
  * with a precision of 0.001953125 dB. E.g. +2 dB is stored as $04 00
 69  
  * and -2 dB is $FC 00.
 70  
  * <p/>
 71  
  * Adjustment points should be ordered by frequency and one frequency
 72  
  * should only be described once in the frame.
 73  
  */
 74  
 public class FrameBodyEQU2 extends AbstractID3v2FrameBody implements ID3v24FrameBody
 75  
 {
 76  
     /**
 77  
      * Creates a new FrameBodyEQU2 datatype.
 78  
      */
 79  
     public FrameBodyEQU2()
 80  0
     {
 81  
 
 82  0
     }
 83  
 
 84  
     public FrameBodyEQU2(FrameBodyEQU2 body)
 85  
     {
 86  0
         super(body);
 87  0
     }
 88  
 
 89  
     /**
 90  
      * Creates a new FrameBodyEQU2 datatype.
 91  
      *
 92  
      * @throws InvalidTagException if unable to create framebody from buffer
 93  
      */
 94  
     public FrameBodyEQU2(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
 95  
     {
 96  0
         super(byteBuffer, frameSize);
 97  0
     }
 98  
 
 99  
     /**
 100  
      * The ID3v2 frame identifier
 101  
      *
 102  
      * @return the ID3v2 frame identifier  for this frame type
 103  
      */
 104  
     public String getIdentifier()
 105  
     {
 106  0
         return ID3v24Frames.FRAME_ID_EQUALISATION2;
 107  
     }
 108  
 
 109  
     /**
 110  
      *
 111  
      */
 112  
     protected void setupObjectList()
 113  
     {
 114  0
         objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));
 115  0
     }
 116  
 }