itproperties.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright           : (C) 2011 by Mathias Panzenböck
00003     email               : grosser.meister.morti@gmx.net
00004  ***************************************************************************/
00005 
00006 /***************************************************************************
00007  *   This library is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU Lesser General Public License version   *
00009  *   2.1 as published by the Free Software Foundation.                     *
00010  *                                                                         *
00011  *   This library is distributed in the hope that it will be useful, but   *
00012  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014  *   Lesser General Public License for more details.                       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with this library; if not, write to the Free Software   *
00018  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
00019  *   02110-1301  USA                                                       *
00020  *                                                                         *
00021  *   Alternatively, this file is available under the Mozilla Public        *
00022  *   License Version 1.1.  You may obtain a copy of the License at         *
00023  *   http://www.mozilla.org/MPL/                                           *
00024  ***************************************************************************/
00025 
00026 #ifndef TAGLIB_ITPROPERTIES_H
00027 #define TAGLIB_ITPROPERTIES_H
00028 
00029 #include "taglib.h"
00030 #include "audioproperties.h"
00031 
00032 namespace TagLib {
00033   namespace IT {
00034     class TAGLIB_EXPORT Properties : public AudioProperties {
00035       friend class File;
00036     public:
00038       enum {
00039         Stereo                  =   1,
00040         Vol0MixOptimizations    =   2,
00041         UseInstruments          =   4,
00042         LinearSlides            =   8,
00043         OldEffects              =  16,
00044         LinkEffects             =  32,
00045         UseMidiPitchController  =  64,
00046         RequestEmbeddedMidiConf = 128
00047       };
00048 
00050       enum {
00051         MessageAttached  = 1,
00052         MidiConfEmbedded = 8
00053       };
00054 
00055       Properties(AudioProperties::ReadStyle propertiesStyle);
00056       virtual ~Properties();
00057 
00058       int length()               const;
00059       int lengthInSeconds()      const;
00060       int lengthInMilliseconds() const;
00061       int bitrate()              const;
00062       int sampleRate()           const;
00063       int channels()             const;
00064 
00065       unsigned short lengthInPatterns()  const;
00066       bool           stereo()            const;
00067       unsigned short instrumentCount()   const;
00068       unsigned short sampleCount()       const;
00069       unsigned short patternCount()      const;
00070       unsigned short version()           const;
00071       unsigned short compatibleVersion() const;
00072       unsigned short flags()             const;
00073       unsigned short special()           const;
00074       unsigned char  globalVolume()      const;
00075       unsigned char  mixVolume()         const;
00076       unsigned char  tempo()             const;
00077       unsigned char  bpmSpeed()          const;
00078       unsigned char  panningSeparation() const;
00079       unsigned char  pitchWheelDepth()   const;
00080 
00081       void setChannels(int channels);
00082       void setLengthInPatterns(unsigned short lengthInPatterns);
00083       void setInstrumentCount(unsigned short instrumentCount);
00084       void setSampleCount (unsigned short sampleCount);
00085       void setPatternCount(unsigned short patternCount);
00086       void setVersion     (unsigned short version);
00087       void setCompatibleVersion(unsigned short compatibleVersion);
00088       void setFlags       (unsigned short flags);
00089       void setSpecial     (unsigned short special);
00090       void setGlobalVolume(unsigned char globalVolume);
00091       void setMixVolume   (unsigned char mixVolume);
00092       void setTempo       (unsigned char tempo);
00093       void setBpmSpeed    (unsigned char bpmSpeed);
00094       void setPanningSeparation(unsigned char panningSeparation);
00095       void setPitchWheelDepth  (unsigned char pitchWheelDepth);
00096 
00097     private:
00098       Properties(const Properties&);
00099       Properties &operator=(const Properties&);
00100 
00101       class PropertiesPrivate;
00102       PropertiesPrivate *d;
00103     };
00104   }
00105 }
00106 
00107 #endif