1 /*************************************************************************** 2 copyright : (C) 2011 by Mathias Panzenböck 3 email : [email protected] 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_S3MPROPERTIES_H 27 #define TAGLIB_S3MPROPERTIES_H 28 29 #include "taglib.h" 30 #include "audioproperties.h" 31 32 namespace TagLib { 33 namespace S3M { 34 class TAGLIB_EXPORT Properties : public AudioProperties { 35 friend class File; 36 public: 37 /*! Flag bits. */ 38 enum { 39 ST2Vibrato = 1, 40 ST2Tempo = 2, 41 AmigaSlides = 4, 42 Vol0MixOptimizations = 8, 43 AmigaLimits = 16, 44 EnableFilter = 32, 45 CustomData = 128 46 }; 47 48 Properties(AudioProperties::ReadStyle propertiesStyle); 49 virtual ~Properties(); 50 51 int length() const; 52 int lengthInSeconds() const; 53 int lengthInMilliseconds() const; 54 int bitrate() const; 55 int sampleRate() const; 56 int channels() const; 57 58 unsigned short lengthInPatterns() const; 59 bool stereo() const; 60 unsigned short sampleCount() const; 61 unsigned short patternCount() const; 62 unsigned short flags() const; 63 unsigned short trackerVersion() const; 64 unsigned short fileFormatVersion() const; 65 unsigned char globalVolume() const; 66 unsigned char masterVolume() const; 67 unsigned char tempo() const; 68 unsigned char bpmSpeed() const; 69 70 void setChannels(int channels); 71 72 void setLengthInPatterns (unsigned short lengthInPatterns); 73 void setStereo (bool stereo); 74 void setSampleCount (unsigned short sampleCount); 75 void setPatternCount (unsigned short patternCount); 76 void setFlags (unsigned short flags); 77 void setTrackerVersion (unsigned short trackerVersion); 78 void setFileFormatVersion(unsigned short fileFormatVersion); 79 void setGlobalVolume (unsigned char globalVolume); 80 void setMasterVolume (unsigned char masterVolume); 81 void setTempo (unsigned char tempo); 82 void setBpmSpeed (unsigned char bpmSpeed); 83 84 private: 85 Properties(const Properties&); 86 Properties &operator=(const Properties&); 87 88 class PropertiesPrivate; 89 PropertiesPrivate *d; 90 }; 91 } 92 } 93 94 #endif 95