TagLib  2.2.1
apeproperties.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2010 by Alex Novichkov
3  email : novichko@atnet.ru
4 
5  copyright : (C) 2006 by Lukáš Lalinský
6  email : lalinsky@gmail.com
7  (original WavPack implementation)
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU Lesser General Public License version *
13  * 2.1 as published by the Free Software Foundation. *
14  * *
15  * This library is distributed in the hope that it will be useful, but *
16  * WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18  * Lesser General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU Lesser General Public *
21  * License along with this library; if not, write to the Free Software *
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
23  * 02110-1301 USA *
24  * *
25  * Alternatively, this file is available under the Mozilla Public *
26  * License Version 1.1. You may obtain a copy of the License at *
27  * http://www.mozilla.org/MPL/ *
28  ***************************************************************************/
29 
30 #ifndef TAGLIB_APEPROPERTIES_H
31 #define TAGLIB_APEPROPERTIES_H
32 
33 #include "taglib.h"
34 #include "taglib_export.h"
35 #include "audioproperties.h"
36 
37 namespace TagLib {
38 
39  namespace APE {
40 
41  class File;
42 
44 
51  {
52  public:
57  Properties(File *file, offset_t streamLength, ReadStyle style = Average);
58 
62  ~Properties() override;
63 
64  Properties(const Properties &) = delete;
65  Properties &operator=(const Properties &) = delete;
66 
72  int lengthInMilliseconds() const override;
73 
77  int bitrate() const override;
78 
82  int sampleRate() const override;
83 
87  int channels() const override;
88 
92  int bitsPerSample() const;
93 
97  unsigned int sampleFrames() const;
98 
102  int version() const;
103 
104  private:
105  void read(File *file, offset_t streamLength);
106 
107  void analyzeCurrent(File *file);
108  void analyzeOld(File *file);
109 
110  class PropertiesPrivate;
112  std::unique_ptr<PropertiesPrivate> d;
113  };
114  } // namespace APE
115 } // namespace TagLib
116 
117 #endif
An implementation of audio property reading for APE.
Definition: apeproperties.h:50
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A simple, abstract interface to common audio properties.
Definition: audioproperties.h:45
off_t offset_t
Definition: taglib.h:64
An implementation of TagLib::File with APE specific methods.
Definition: apefile.h:68
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41