2
* @author : Paul Taylor
5
* Version @version:$Id: FrameBodyEQU2.java,v 1.15 2009/11/12 13:25:19 paultaylor Exp $
7
* MusicTag Copyright (C)2003,2004
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.
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.
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
24
package org.jaudiotagger.tag.id3.framebody;
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;
31
import java.nio.ByteBuffer;
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.
42
* <Header of 'Equalisation (2)', ID: "EQU2">
43
* Interpolation method $xx
44
* Identification <text string> $00
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:
51
* No interpolation is made. A jump from one adjustment level to
52
* another occurs in the middle between two adjustment points.
54
* Interpolation between adjustment points is linear.
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
61
* Volume adjustment $xx xx
63
* The frequency is stored in units of 1/2 Hz, giving it a range from 0
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.
71
* Adjustment points should be ordered by frequency and one frequency
72
* should only be described once in the frame.
74
public class FrameBodyEQU2 extends AbstractID3v2FrameBody implements ID3v24FrameBody
77
* Creates a new FrameBodyEQU2 datatype.
79
public FrameBodyEQU2()
84
public FrameBodyEQU2(FrameBodyEQU2 body)
90
* Creates a new FrameBodyEQU2 datatype.
94
* @throws InvalidTagException if unable to create framebody from buffer
96
public FrameBodyEQU2(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
98
super(byteBuffer, frameSize);
102
* The ID3v2 frame identifier
104
* @return the ID3v2 frame identifier for this frame type
106
public String getIdentifier()
108
return ID3v24Frames.FRAME_ID_EQUALISATION2;
114
protected void setupObjectList()
116
objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));
2
* @author : Paul Taylor
5
* Version @version:$Id: FrameBodyEQU2.java 832 2009-11-12 13:25:38Z paultaylor $
7
* MusicTag Copyright (C)2003,2004
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.
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.
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
24
package org.jaudiotagger.tag.id3.framebody;
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;
31
import java.nio.ByteBuffer;
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.
42
* <Header of 'Equalisation (2)', ID: "EQU2">
43
* Interpolation method $xx
44
* Identification <text string> $00
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:
51
* No interpolation is made. A jump from one adjustment level to
52
* another occurs in the middle between two adjustment points.
54
* Interpolation between adjustment points is linear.
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
61
* Volume adjustment $xx xx
63
* The frequency is stored in units of 1/2 Hz, giving it a range from 0
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.
71
* Adjustment points should be ordered by frequency and one frequency
72
* should only be described once in the frame.
74
public class FrameBodyEQU2 extends AbstractID3v2FrameBody implements ID3v24FrameBody
77
* Creates a new FrameBodyEQU2 datatype.
79
public FrameBodyEQU2()
84
public FrameBodyEQU2(FrameBodyEQU2 body)
90
* Creates a new FrameBodyEQU2 datatype.
94
* @throws InvalidTagException if unable to create framebody from buffer
96
public FrameBodyEQU2(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
98
super(byteBuffer, frameSize);
102
* The ID3v2 frame identifier
104
* @return the ID3v2 frame identifier for this frame type
106
public String getIdentifier()
108
return ID3v24Frames.FRAME_ID_EQUALISATION2;
114
protected void setupObjectList()
116
objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this));