|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.farng.mp3.AbstractMP3FileItem org.farng.mp3.AbstractMP3FragmentBody org.farng.mp3.id3.AbstractID3v2FrameBody org.farng.mp3.id3.FrameBodyRVAD
This is a more subjective function than the previous ones. It allows the user to say how much he wants to increase/decrease the volume on each channel while the file is played. The purpose is to be able to align all files to a reference volume, so that you don't have to change the volume constantly. This frame may also be used to balance adjust the audio. If the volume peak levels are known then this could be described with the 'Peak volume right' and 'Peak volume left' field. If Peakvolume is not known these fields could be left zeroed or, if no other data follows, be completely omitted. There may only be one "RVAD" frame in each tag.
<Header for 'Relative volume adjustment', ID: "RVAD"> | |
Increment/decrement | %00xxxxxx |
Bits used for volume descr. | $xx |
Relative volume change, right | $xx xx (xx ...) |
Relative volume change, left | $xx xx (xx ...) |
Peak volume right | $xx xx (xx ...) |
Peak volume left | $xx xx (xx ...) |
In the increment/decrement field bit 0 is used to indicate the right channel and bit 1 is used to indicate the left channel. 1 is increment and 0 is decrement.
The 'bits used for volume description' field is normally $10 (16 bits) for MPEG 2 layer I, II and III and MPEG 2.5. This value may not be $00. The volume is always represented with whole bytes, padded in the beginning (highest bits) when 'bits used for volume description' is not a multiple of eight.
This datablock is then optionally followed by a volume definition for the left and right back channels. If this information is appended to the frame the first two channels will be treated as front channels. In the increment/decrement field bit 2 is used to indicate the right back channel and bit 3 for the left back channel.
Relative volume change, right back | $xx xx (xx ...) |
Relative volume change, left back | $xx xx (xx ...) |
Peak volume right back | $xx xx (xx ...) |
Peak volume left back | $xx xx (xx ...) |
If the center channel adjustment is present the following is appended to the existing frame, after the left and right back channels. The center channel is represented by bit 4 in the increase/decrease field.
Relative volume change, center | $xx xx (xx ...) |
Peak volume center | $xx xx (xx ...) |
If the bass channel adjustment is present the following is appended to the existing frame, after the center channel. The bass channel is represented by bit 5 in the increase/decrease field.
Relative volume change, bass | $xx xx (xx ...) |
Peak volume bass | $xx xx (xx ...) |
Constructor Summary | |
FrameBodyRVAD()
Creates a new FrameBodyRVAD object. |
|
FrameBodyRVAD(byte increment,
byte bitsUsed,
long relativeRight,
long relativeLeft,
long peakRight,
long peakLeft,
long relativeRightBack,
long relativeLeftBack,
long peakRightBack,
long peakLeftBack,
long relativeCenter,
long peakCenter,
long relativeBass,
long peakBass)
Creates a new FrameBodyRVAD object. |
|
FrameBodyRVAD(FrameBodyRVAD copyObject)
Creates a new FrameBodyRVAD object. |
|
FrameBodyRVAD(java.io.RandomAccessFile file)
Creates a new FrameBodyRVAD object. |
Method Summary | |
void |
equals()
This method is not yet supported. |
java.lang.String |
getIdentifier()
ID string that usually corresponds to the class name, but can be displayed to the user. |
int |
getSize()
Returns the estimated size in bytes of this object if it was to be written to file. |
void |
read(java.io.RandomAccessFile file)
Read the data from the given file into this object. |
protected void |
setupObjectList()
Create the order of MP3Object objects that this body expects. |
java.lang.String |
toString()
Calls toString for all MP3Object objects and creates a string with a new line
character. |
void |
write(java.io.RandomAccessFile file)
Write the contents of this object to the file at the position it is currently at. |
Methods inherited from class org.farng.mp3.id3.AbstractID3v2FrameBody |
equals, readHeader, writeHeader |
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody |
appendToObjectList, getBriefDescription, getDescription, getObject, getObjectListIterator, has6ByteHeader, isSubsetOf, iterator, setObject |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FrameBodyRVAD()
public FrameBodyRVAD(FrameBodyRVAD copyObject)
public FrameBodyRVAD(byte increment, byte bitsUsed, long relativeRight, long relativeLeft, long peakRight, long peakLeft, long relativeRightBack, long relativeLeftBack, long peakRightBack, long peakLeftBack, long relativeCenter, long peakCenter, long relativeBass, long peakBass)
public FrameBodyRVAD(java.io.RandomAccessFile file) throws java.io.IOException, InvalidTagException
Method Detail |
public java.lang.String getIdentifier()
AbstractMP3FileItem
getIdentifier
in class AbstractMP3FileItem
public int getSize()
AbstractMP3FragmentBody
getSize
in class AbstractMP3FragmentBody
public void equals()
java.lang.UnsupportedOperationException
- This method is not yet supportedprotected void setupObjectList()
AbstractMP3FragmentBody
MP3Object
objects that this body expects. This method needs to be overwritten.
setupObjectList
in class AbstractMP3FragmentBody
public void read(java.io.RandomAccessFile file) throws java.io.IOException, InvalidTagException
AbstractMP3FragmentBody
read
in class AbstractMP3FragmentBody
file
- file to read from
InvalidTagException
- if there is any error in the data format.
java.io.IOException
- on any I/O errorpublic java.lang.String toString()
AbstractMP3FragmentBody
toString
for all MP3Object
objects and creates a string with a new line
character.
toString
in class AbstractMP3FragmentBody
public void write(java.io.RandomAccessFile file) throws java.io.IOException
AbstractMP3FragmentBody
write
in class AbstractMP3FragmentBody
file
- destination file
java.io.IOException
- on any I/O error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |