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,            *
00019  *   MA  02110-1301  USA                                                   *
00020  ***************************************************************************/
00021 
00022 #ifndef TAGLIB_ITPROPERTIES_H
00023 #define TAGLIB_ITPROPERTIES_H
00024 
00025 #include "taglib.h"
00026 #include "audioproperties.h"
00027 
00028 namespace TagLib {
00029   namespace IT {
00030     class TAGLIB_EXPORT Properties : public AudioProperties {
00031       friend class File;
00032     public:
00034       enum {
00035         Stereo                  =   1,
00036         Vol0MixOptimizations    =   2,
00037         UseInstruments          =   4,
00038         LinearSlides            =   8,
00039         OldEffects              =  16,
00040         LinkEffects             =  32,
00041         UseMidiPitchController  =  64,
00042         RequestEmbeddedMidiConf = 128
00043       };
00044 
00046       enum {
00047         MessageAttached  = 1,
00048         MidiConfEmbedded = 8
00049       };
00050 
00051       Properties(AudioProperties::ReadStyle propertiesStyle);
00052       virtual ~Properties();
00053 
00054       int length()               const;
00055       int lengthInSeconds()      const;
00056       int lengthInMilliseconds() const;
00057       int bitrate()              const;
00058       int sampleRate()           const;
00059       int channels()             const;
00060 
00061       ushort lengthInPatterns()  const;
00062       bool   stereo()            const;
00063       ushort instrumentCount()   const;
00064       ushort sampleCount()       const;
00065       ushort patternCount()      const;
00066       ushort version()           const;
00067       ushort compatibleVersion() const;
00068       ushort flags()             const;
00069       ushort special()           const;
00070       uchar  globalVolume()      const;
00071       uchar  mixVolume()         const;
00072       uchar  tempo()             const;
00073       uchar  bpmSpeed()          const;
00074       uchar  panningSeparation() const;
00075       uchar  pitchWheelDepth()   const;
00076 
00077       void setChannels(int channels);
00078       void setLengthInPatterns(ushort lengthInPatterns);
00079       void setInstrumentCount(ushort instrumentCount);
00080       void setSampleCount (ushort sampleCount);
00081       void setPatternCount(ushort patternCount);
00082       void setVersion     (ushort version);
00083       void setCompatibleVersion(ushort compatibleVersion);
00084       void setFlags       (ushort flags);
00085       void setSpecial     (ushort special);
00086       void setGlobalVolume(uchar globalVolume);
00087       void setMixVolume   (uchar mixVolume);
00088       void setTempo       (uchar tempo);
00089       void setBpmSpeed    (uchar bpmSpeed);
00090       void setPanningSeparation(uchar panningSeparation);
00091       void setPitchWheelDepth  (uchar pitchWheelDepth);
00092 
00093     private:
00094       Properties(const Properties&);
00095       Properties &operator=(const Properties&);
00096 
00097       class PropertiesPrivate;
00098       PropertiesPrivate *d;
00099     };
00100   }
00101 }
00102 
00103 #endif