![]() |
|
#include <relativevolumeframe.h>
Inheritance diagram for TagLib::ID3v2::RelativeVolumeFrame:
Public Types | |
Other = 0x00 | |
A type not enumerated below. | |
MasterVolume = 0x01 | |
The master volume for the track. | |
FrontRight = 0x02 | |
The front right audio channel. | |
FrontLeft = 0x03 | |
The front left audio channel. | |
BackRight = 0x04 | |
The back right audio channel. | |
BackLeft = 0x05 | |
The back left audio channel. | |
FrontCentre = 0x06 | |
The front center audio channel. | |
BackCentre = 0x07 | |
The back center audio channel. | |
Subwoofer = 0x08 | |
The subwoofer audio channel. | |
enum | ChannelType { Other = 0x00, MasterVolume = 0x01, FrontRight = 0x02, FrontLeft = 0x03, BackRight = 0x04, BackLeft = 0x05, FrontCentre = 0x06, BackCentre = 0x07, Subwoofer = 0x08 } |
Public Member Functions | |
RelativeVolumeFrame () | |
RelativeVolumeFrame (const ByteVector &data) | |
virtual | ~RelativeVolumeFrame () |
virtual String | toString () const |
List< ChannelType > | channels () const |
ChannelType | channelType () const |
void | setChannelType (ChannelType t) |
short | volumeAdjustmentIndex (ChannelType type=MasterVolume) const |
void | setVolumeAdjustmentIndex (short index, ChannelType type=MasterVolume) |
float | volumeAdjustment (ChannelType type=MasterVolume) const |
void | setVolumeAdjustment (float adjustment, ChannelType type=MasterVolume) |
PeakVolume | peakVolume (ChannelType type=MasterVolume) const |
void | setPeakVolume (const PeakVolume &peak, ChannelType type=MasterVolume) |
String | identification () const |
void | setIdentification (const String &s) |
Protected Member Functions | |
virtual void | parseFields (const ByteVector &data) |
virtual ByteVector | renderFields () const |
Friends | |
class | FrameFactory |
Classes | |
struct | PeakVolume |
Struct that stores the relevant values for ID3v2 peak volume. More... |
This is an implementation of ID3v2 relative volume adjustment. The presence of this frame makes it possible to specify an increase in volume for an audio file or specific audio tracks in that file.
Multiple relative volume adjustment frames may be present in the tag each with a unique identification and describing volume adjustment for different channel types.
This indicates the type of volume adjustment that should be applied.
TagLib::ID3v2::RelativeVolumeFrame::RelativeVolumeFrame | ( | ) |
Constructs a RelativeVolumeFrame. The relevant data should be set manually.
TagLib::ID3v2::RelativeVolumeFrame::RelativeVolumeFrame | ( | const ByteVector & | data | ) |
Constructs a RelativeVolumeFrame based on the contents of data.
virtual TagLib::ID3v2::RelativeVolumeFrame::~RelativeVolumeFrame | ( | ) | [virtual] |
Destroys the RelativeVolumeFrame instance.
List<ChannelType> TagLib::ID3v2::RelativeVolumeFrame::channels | ( | ) | const |
Returns a list of channels with information currently in the frame.
ChannelType TagLib::ID3v2::RelativeVolumeFrame::channelType | ( | ) | const |
String TagLib::ID3v2::RelativeVolumeFrame::identification | ( | ) | const |
Returns the identification for this frame.
virtual void TagLib::ID3v2::RelativeVolumeFrame::parseFields | ( | const ByteVector & | data | ) | [protected, virtual] |
PeakVolume TagLib::ID3v2::RelativeVolumeFrame::peakVolume | ( | ChannelType | type = MasterVolume |
) | const |
Returns the peak volume (represented as a length and a string of bits).
This defaults to returning the value for the master volume channel if available and returns 0 if the specified channel does not exist.
virtual ByteVector TagLib::ID3v2::RelativeVolumeFrame::renderFields | ( | ) | const [protected, virtual] |
void TagLib::ID3v2::RelativeVolumeFrame::setChannelType | ( | ChannelType | t | ) |
void TagLib::ID3v2::RelativeVolumeFrame::setIdentification | ( | const String & | s | ) |
Sets the identification of the frame to s. The string is used to identify the situation and/or device where this adjustment should apply.
void TagLib::ID3v2::RelativeVolumeFrame::setPeakVolume | ( | const PeakVolume & | peak, | |
ChannelType | type = MasterVolume | |||
) |
Sets the peak volume to peak.
By default this sets the value for the master volume.
void TagLib::ID3v2::RelativeVolumeFrame::setVolumeAdjustment | ( | float | adjustment, | |
ChannelType | type = MasterVolume | |||
) |
Set the relative volume adjustment in decibels to adjustment.
By default this sets the value for the master volume.
void TagLib::ID3v2::RelativeVolumeFrame::setVolumeAdjustmentIndex | ( | short | index, | |
ChannelType | type = MasterVolume | |||
) |
Set the volume adjustment to index. As indicated by the ID3v2 standard this is a 16-bit signed integer that reflects the decibils of adjustment when divided by 512.
By default this sets the value for the master volume.
setVolumeAjustment()
virtual String TagLib::ID3v2::RelativeVolumeFrame::toString | ( | ) | const [virtual] |
float TagLib::ID3v2::RelativeVolumeFrame::volumeAdjustment | ( | ChannelType | type = MasterVolume |
) | const |
Returns the relative volume adjustment in decibels.
short TagLib::ID3v2::RelativeVolumeFrame::volumeAdjustmentIndex | ( | ChannelType | type = MasterVolume |
) | const |
Returns the relative volume adjustment "index". As indicated by the ID3v2 standard this is a 16-bit signed integer that reflects the decibils of adjustment when divided by 512.
This defaults to returning the value for the master volume channel if available and returns 0 if the specified channel does not exist.
volumeAjustment()
friend class FrameFactory [friend] |