00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <tstring.h>
00023 #include <wmaproperties.h>
00024
00025 using namespace TagLib;
00026
00027 class WMA::Properties::PropertiesPrivate
00028 {
00029 public:
00030 PropertiesPrivate(): length(0), bitrate(0), sampleRate(0), channels(0) {}
00031 int length;
00032 int bitrate;
00033 int sampleRate;
00034 int channels;
00035 };
00036
00038
00040
00041 WMA::Properties::Properties() : AudioProperties(AudioProperties::Average)
00042 {
00043 d = new PropertiesPrivate;
00044 }
00045
00046 WMA::Properties::~Properties()
00047 {
00048 if(d)
00049 delete d;
00050 }
00051
00052 int WMA::Properties::length() const
00053 {
00054 return d->length;
00055 }
00056
00057 int WMA::Properties::bitrate() const
00058 {
00059 return d->bitrate;
00060 }
00061
00062 int WMA::Properties::sampleRate() const
00063 {
00064 return d->sampleRate;
00065 }
00066
00067 int WMA::Properties::channels() const
00068 {
00069 return d->channels;
00070 }
00071
00073
00075
00076 void WMA::Properties::set(int length, int bitrate, int sampleRate, int channels)
00077 {
00078 d->length = length;
00079 d->bitrate = bitrate;
00080 d->sampleRate = sampleRate;
00081 d->channels = channels;
00082 }
00083