TagLib  2.2.1
flacproperties.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2003 by Allan Sandfeld Jensen
3  email : kde@carewolf.org
4  ***************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_FLACPROPERTIES_H
27 #define TAGLIB_FLACPROPERTIES_H
28 
29 #include "tbytevector.h"
30 #include "taglib_export.h"
31 #include "audioproperties.h"
32 
33 namespace TagLib {
34 
35  namespace FLAC {
36 
38 
45  {
46  public:
51  Properties(const ByteVector &data, offset_t streamLength, ReadStyle style = Average);
52 
56  ~Properties() override;
57 
58  Properties(const Properties &) = delete;
59  Properties &operator=(const Properties &) = delete;
60 
66  int lengthInMilliseconds() const override;
67 
71  int bitrate() const override;
72 
76  int sampleRate() const override;
77 
81  int channels() const override;
82 
87  int bitsPerSample() const;
88 
92  unsigned long long sampleFrames() const;
93 
98  ByteVector signature() const;
99 
100  private:
101  void read(const ByteVector &data, offset_t streamLength);
102 
103  class PropertiesPrivate;
105  std::unique_ptr<PropertiesPrivate> d;
106  };
107  } // namespace FLAC
108 } // namespace TagLib
109 
110 #endif
A byte vector.
Definition: tbytevector.h:45
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
An implementation of audio property reading for FLAC.
Definition: flacproperties.h:44
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
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41