TagLib API Documentation
trueaudioproperties.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_TRUEAUDIOPROPERTIES_H
31#define TAGLIB_TRUEAUDIOPROPERTIES_H
32
33#include "tbytevector.h"
34#include "audioproperties.h"
35
36namespace TagLib {
37
38 namespace TrueAudio {
39
40 static constexpr unsigned int HeaderSize = 18;
41
43
50 {
51 public:
56 Properties(const ByteVector &data, offset_t streamLength, ReadStyle style = Average);
57
61 ~Properties() override;
62
63 Properties(const Properties &) = delete;
64 Properties &operator=(const Properties &) = delete;
65
72 int lengthInSeconds() const override;
73
79 int lengthInMilliseconds() const override;
80
84 int bitrate() const override;
85
89 int sampleRate() const override;
90
94 int channels() const override;
95
99 int bitsPerSample() const;
100
104 unsigned int sampleFrames() const;
105
109 int ttaVersion() const;
110
111 private:
112 void read(const ByteVector &data, offset_t streamLength);
113
114 class PropertiesPrivate;
116 std::unique_ptr<PropertiesPrivate> d;
117 };
118 } // namespace TrueAudio
119} // namespace TagLib
120
121#endif
A simple, abstract interface to common audio properties.
Definition: audioproperties.h:46
ReadStyle
Definition: audioproperties.h:56
A byte vector.
Definition: tbytevector.h:46
An implementation of audio property reading for TrueAudio.
Definition: trueaudioproperties.h:50
unsigned int sampleFrames() const
Properties(const Properties &)=delete
Properties & operator=(const Properties &)=delete
int bitrate() const override
int sampleRate() const override
int lengthInMilliseconds() const override
int lengthInSeconds() const override
int channels() const override
Properties(const ByteVector &data, offset_t streamLength, ReadStyle style=Average)
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
off_t offset_t
Definition: taglib.h:64
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55