s3mproperties.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_S3MPROPERTIES_H
00023 #define TAGLIB_S3MPROPERTIES_H
00024 
00025 #include "taglib.h"
00026 #include "audioproperties.h"
00027 
00028 namespace TagLib {
00029   namespace S3M {
00030     class TAGLIB_EXPORT Properties : public AudioProperties {
00031       friend class File;
00032     public:
00034       enum {
00035         ST2Vibrato           =   1,
00036         ST2Tempo             =   2,
00037         AmigaSlides          =   4,
00038         Vol0MixOptimizations =   8,
00039         AmigaLimits          =  16,
00040         EnableFilter         =  32,
00041         CustomData           = 128
00042       };
00043 
00044       Properties(AudioProperties::ReadStyle propertiesStyle);
00045       virtual ~Properties();
00046 
00047       int length()               const;
00048       int lengthInSeconds()      const;
00049       int lengthInMilliseconds() const;
00050       int bitrate()              const;
00051       int sampleRate()           const;
00052       int channels()             const;
00053 
00054       ushort lengthInPatterns()  const;
00055       bool   stereo()            const;
00056       ushort sampleCount()       const;
00057       ushort patternCount()      const;
00058       ushort flags()             const;
00059       ushort trackerVersion()    const;
00060       ushort fileFormatVersion() const;
00061       uchar  globalVolume()      const;
00062       uchar  masterVolume()      const;
00063       uchar  tempo()             const;
00064       uchar  bpmSpeed()          const;
00065 
00066       void setChannels(int channels);
00067 
00068       void setLengthInPatterns (ushort lengthInPatterns);
00069       void setStereo           (bool stereo);
00070       void setSampleCount      (ushort sampleCount);
00071       void setPatternCount     (ushort patternCount);
00072       void setFlags            (ushort flags);
00073       void setTrackerVersion   (ushort trackerVersion);
00074       void setFileFormatVersion(ushort fileFormatVersion);
00075       void setGlobalVolume     (uchar globalVolume);
00076       void setMasterVolume     (uchar masterVolume);
00077       void setTempo            (uchar tempo);
00078       void setBpmSpeed         (uchar bpmSpeed);
00079 
00080     private:
00081       Properties(const Properties&);
00082       Properties &operator=(const Properties&);
00083 
00084       class PropertiesPrivate;
00085       PropertiesPrivate *d;
00086     };
00087   }
00088 }
00089 
00090 #endif