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