wavpackproperties.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2006 by Lukáš Lalinský
3  email : lalinsky@gmail.com
4 
5  copyright : (C) 2004 by Allan Sandfeld Jensen
6  email : kde@carewolf.org
7  (original MPC 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_WVPROPERTIES_H
31 #define TAGLIB_WVPROPERTIES_H
32 
33 #include "taglib_export.h"
34 #include "audioproperties.h"
35 
36 namespace TagLib {
37 
38  namespace WavPack {
39 
40  class File;
41 
42  static const uint HeaderSize = 32;
43 
45 
52  {
53  public:
61  Properties(const ByteVector &data, long streamLength, ReadStyle style = Average);
62 
66  // BIC: merge with the above constructor
67  Properties(File *file, long streamLength, ReadStyle style = Average);
68 
72  virtual ~Properties();
73 
74  // Reimplementations.
75 
76  virtual int length() const;
77  virtual int bitrate() const;
78 
82  virtual int sampleRate() const;
83 
84  virtual int channels() const;
85 
89  int bitsPerSample() const;
90  uint sampleFrames() const;
91 
95  int version() const;
96 
97  private:
98  Properties(const Properties &);
99  Properties &operator=(const Properties &);
100 
101  void read();
102  unsigned int seekFinalIndex();
103 
104  class PropertiesPrivate;
105  PropertiesPrivate *d;
106  };
107  }
108 }
109 
110 #endif