relativevolumeframe.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TAGLIB_RELATIVEVOLUMEFRAME_H
00023 #define TAGLIB_RELATIVEVOLUMEFRAME_H
00024
00025 #include <id3v2frame.h>
00026
00027 namespace TagLib {
00028
00029 namespace ID3v2 {
00030
00032
00043 class RelativeVolumeFrame : public Frame
00044 {
00045 friend class FrameFactory;
00046
00047 public:
00048
00052 enum ChannelType {
00054 Other = 0x00,
00056 MasterVolume = 0x01,
00058 FrontRight = 0x02,
00060 FrontLeft = 0x03,
00062 BackRight = 0x04,
00064 BackLeft = 0x05,
00066 FrontCentre = 0x06,
00068 BackCentre = 0x07,
00070 Subwoofer = 0x08
00071 };
00072
00074
00079 struct PeakVolume
00080 {
00084 PeakVolume() : bitsRepresentingPeak(0) {}
00089 unsigned char bitsRepresentingPeak;
00094 ByteVector peakVolume;
00095 };
00096
00101 RelativeVolumeFrame();
00102
00106 RelativeVolumeFrame(const ByteVector &data);
00107
00111 virtual ~RelativeVolumeFrame();
00112
00118 virtual String toString() const;
00119
00125 ChannelType channelType() const;
00126
00132 void setChannelType(ChannelType t);
00133
00142 short volumeAdjustmentIndex() const;
00143
00152 void setVolumeAdjustmentIndex(short index);
00153
00164 float volumeAdjustment() const;
00165
00176 void setVolumeAdjustment(float adjustment);
00177
00183 PeakVolume peakVolume() const;
00184
00190 void setPeakVolume(const PeakVolume &peak);
00191
00192 protected:
00193 virtual void parseFields(const ByteVector &data);
00194 virtual ByteVector renderFields() const;
00195
00196 private:
00197 RelativeVolumeFrame(const ByteVector &data, Header *h);
00198 RelativeVolumeFrame(const RelativeVolumeFrame &);
00199 RelativeVolumeFrame &operator=(const RelativeVolumeFrame &);
00200
00201 class RelativeVolumeFramePrivate;
00202 RelativeVolumeFramePrivate *d;
00203 };
00204
00205 }
00206 }
00207 #endif