1 /***************************************************************************
2     copyright           : (C) 2011 by Mathias Panzenböck
3     email               : grosser.meister.morti@gmx.net
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 
27 #include "modproperties.h"
28 
29 using namespace TagLib;
30 using namespace Mod;
31 
32 class Mod::Properties::PropertiesPrivate
33 {
34 public:
PropertiesPrivate()35   PropertiesPrivate() :
36     channels(0),
37     instrumentCount(0),
38     lengthInPatterns(0)
39   {
40   }
41 
42   int           channels;
43   unsigned int  instrumentCount;
44   unsigned char lengthInPatterns;
45 };
46 
Properties(AudioProperties::ReadStyle propertiesStyle)47 Mod::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
48   AudioProperties(propertiesStyle),
49   d(new PropertiesPrivate())
50 {
51 }
52 
~Properties()53 Mod::Properties::~Properties()
54 {
55   delete d;
56 }
57 
length() const58 int Mod::Properties::length() const
59 {
60   return 0;
61 }
62 
lengthInSeconds() const63 int Mod::Properties::lengthInSeconds() const
64 {
65   return 0;
66 }
67 
lengthInMilliseconds() const68 int Mod::Properties::lengthInMilliseconds() const
69 {
70   return 0;
71 }
72 
bitrate() const73 int Mod::Properties::bitrate() const
74 {
75   return 0;
76 }
77 
sampleRate() const78 int Mod::Properties::sampleRate() const
79 {
80   return 0;
81 }
82 
channels() const83 int Mod::Properties::channels() const
84 {
85   return d->channels;
86 }
87 
instrumentCount() const88 unsigned int Mod::Properties::instrumentCount() const
89 {
90   return d->instrumentCount;
91 }
92 
lengthInPatterns() const93 unsigned char Mod::Properties::lengthInPatterns() const
94 {
95   return d->lengthInPatterns;
96 }
97 
setChannels(int channels)98 void Mod::Properties::setChannels(int channels)
99 {
100   d->channels = channels;
101 }
102 
setInstrumentCount(unsigned int instrumentCount)103 void Mod::Properties::setInstrumentCount(unsigned int instrumentCount)
104 {
105   d->instrumentCount = instrumentCount;
106 }
107 
setLengthInPatterns(unsigned char lengthInPatterns)108 void Mod::Properties::setLengthInPatterns(unsigned char lengthInPatterns)
109 {
110   d->lengthInPatterns = lengthInPatterns;
111 }
112