Added TagLib (with AUTORS and COPYING files)
[someplayer] / src / taglib / trueaudio / trueaudioproperties.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
23  *   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 "audioproperties.h"
34
35 namespace TagLib {
36
37   namespace TrueAudio {
38
39     class File;
40
41     static const uint HeaderSize = 18;
42
43     //! An implementation of audio property reading for TrueAudio
44
45     /*!
46      * This reads the data from an TrueAudio stream found in the AudioProperties
47      * API.
48      */
49
50     class TAGLIB_EXPORT Properties : public AudioProperties
51     {
52     public:
53       /*!
54        * Create an instance of TrueAudio::Properties with the data read from the
55        * ByteVector \a data.
56        */
57       Properties(const ByteVector &data, long streamLength, ReadStyle style = Average);
58
59       /*!
60        * Destroys this TrueAudio::Properties instance.
61        */
62       virtual ~Properties();
63
64       // Reimplementations.
65
66       virtual int length() const;
67       virtual int bitrate() const;
68       virtual int sampleRate() const;
69       virtual int channels() const;
70
71       /*!
72        * Returns number of bits per sample.
73        */
74       int bitsPerSample() const;
75
76       /*!
77        * Returns the major version number.
78        */
79       int ttaVersion() const;
80
81     private:
82       Properties(const Properties &);
83       Properties &operator=(const Properties &);
84
85       void read();
86
87       class PropertiesPrivate;
88       PropertiesPrivate *d;
89     };
90   }
91 }
92
93 #endif