apeproperties.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2010 by Alex Novichkov
00003     email                : novichko@atnet.ru
00004 
00005     copyright            : (C) 2006 by Lukáš Lalinský
00006     email                : lalinsky@gmail.com
00007                            (original WavPack implementation)
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *   This library is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License version   *
00013  *   2.1 as published by the Free Software Foundation.                     *
00014  *                                                                         *
00015  *   This library is distributed in the hope that it will be useful, but   *
00016  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00018  *   Lesser General Public License for more details.                       *
00019  *                                                                         *
00020  *   You should have received a copy of the GNU Lesser General Public      *
00021  *   License along with this library; if not, write to the Free Software   *
00022  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
00023  *   02110-1301  USA                                                       *
00024  *                                                                         *
00025  *   Alternatively, this file is available under the Mozilla Public        *
00026  *   License Version 1.1.  You may obtain a copy of the License at         *
00027  *   http://www.mozilla.org/MPL/                                           *
00028  ***************************************************************************/
00029 
00030 #ifndef TAGLIB_APEPROPERTIES_H
00031 #define TAGLIB_APEPROPERTIES_H
00032 
00033 #include "taglib_export.h"
00034 #include "audioproperties.h"
00035 
00036 namespace TagLib {
00037 
00038   namespace APE {
00039 
00040     class File;
00041 
00043 
00049     class TAGLIB_EXPORT Properties : public AudioProperties
00050     {
00051     public:
00058       Properties(File *file, ReadStyle style = Average);
00059 
00064       Properties(File *file, long streamLength, ReadStyle style = Average);
00065 
00069       virtual ~Properties();
00070 
00079       virtual int length() const;
00080 
00087       // BIC: make virtual
00088       int lengthInSeconds() const;
00089 
00095       // BIC: make virtual
00096       int lengthInMilliseconds() const;
00097 
00101       virtual int bitrate() const;
00102 
00106       virtual int sampleRate() const;
00107 
00111       virtual int channels() const;
00112 
00116       int bitsPerSample() const;
00117 
00121       unsigned int sampleFrames() const;
00122 
00126       int version() const;
00127 
00128     private:
00129       Properties(const Properties &);
00130       Properties &operator=(const Properties &);
00131 
00132       void read(File *file, long streamLength);
00133 
00134       void analyzeCurrent(File *file);
00135       void analyzeOld(File *file);
00136 
00137       class PropertiesPrivate;
00138       PropertiesPrivate *d;
00139     };
00140   }
00141 }
00142 
00143 #endif