1 /***************************************************************************
2     copyright           : (C) 2011 by Mathias Panzenböck
3     email               : grosser.meister.morti@gmx.net
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_ITPROPERTIES_H
27 #define TAGLIB_ITPROPERTIES_H
28 
29 #include "taglib.h"
30 #include "audioproperties.h"
31 
32 namespace TagLib {
33   namespace IT {
34     class TAGLIB_EXPORT Properties : public AudioProperties {
35       friend class File;
36     public:
37       /*! Flag bits. */
38       enum {
39         Stereo                  =   1,
40         Vol0MixOptimizations    =   2,
41         UseInstruments          =   4,
42         LinearSlides            =   8,
43         OldEffects              =  16,
44         LinkEffects             =  32,
45         UseMidiPitchController  =  64,
46         RequestEmbeddedMidiConf = 128
47       };
48 
49       /*! Special bits. */
50       enum {
51         MessageAttached  = 1,
52         MidiConfEmbedded = 8
53       };
54 
55       Properties(AudioProperties::ReadStyle propertiesStyle);
56       virtual ~Properties();
57 
58       int length()               const;
59       int lengthInSeconds()      const;
60       int lengthInMilliseconds() const;
61       int bitrate()              const;
62       int sampleRate()           const;
63       int channels()             const;
64 
65       unsigned short lengthInPatterns()  const;
66       bool           stereo()            const;
67       unsigned short instrumentCount()   const;
68       unsigned short sampleCount()       const;
69       unsigned short patternCount()      const;
70       unsigned short version()           const;
71       unsigned short compatibleVersion() const;
72       unsigned short flags()             const;
73       unsigned short special()           const;
74       unsigned char  globalVolume()      const;
75       unsigned char  mixVolume()         const;
76       unsigned char  tempo()             const;
77       unsigned char  bpmSpeed()          const;
78       unsigned char  panningSeparation() const;
79       unsigned char  pitchWheelDepth()   const;
80 
81       void setChannels(int channels);
82       void setLengthInPatterns(unsigned short lengthInPatterns);
83       void setInstrumentCount(unsigned short instrumentCount);
84       void setSampleCount (unsigned short sampleCount);
85       void setPatternCount(unsigned short patternCount);
86       void setVersion     (unsigned short version);
87       void setCompatibleVersion(unsigned short compatibleVersion);
88       void setFlags       (unsigned short flags);
89       void setSpecial     (unsigned short special);
90       void setGlobalVolume(unsigned char globalVolume);
91       void setMixVolume   (unsigned char mixVolume);
92       void setTempo       (unsigned char tempo);
93       void setBpmSpeed    (unsigned char bpmSpeed);
94       void setPanningSeparation(unsigned char panningSeparation);
95       void setPitchWheelDepth  (unsigned char pitchWheelDepth);
96 
97     private:
98       Properties(const Properties&);
99       Properties &operator=(const Properties&);
100 
101       class PropertiesPrivate;
102       PropertiesPrivate *d;
103     };
104   }
105 }
106 
107 #endif
108