wmatag/wmaproperties.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2005 by Lukas Lalinsky
00003     email                : lalinsky@gmail.com
00004  ***************************************************************************/
00005 
00006 /***************************************************************************
00007  *   This library is free software; you can redistribute it and/or modify  *
00008  *   it  under the terms of the GNU Lesser General Public License version  *
00009  *   2.1 as published by the Free Software Foundation.                     *
00010  *                                                                         *
00011  *   This library is distributed in the hope that it will be useful, but   *
00012  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014  *   Lesser General Public License for more details.                       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with this library; if not, write to the Free Software   *
00018  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            *
00019  *   MA  02110-1301  USA                                                   *
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 // public members
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 // private members
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 

Generated on Mon Aug 6 21:24:20 2007 for plai by  doxygen 1.5.1