fixed mod property names and added unit test for xm

This commit is contained in:
Mathias Panzenböck
2011-06-18 03:31:49 +02:00
parent fe356c31b4
commit 5ad69f6f2a
18 changed files with 257 additions and 146 deletions

View File

@ -98,7 +98,7 @@ void IT::File::read(bool)
READ_U16L_AS(instrumentCount);
READ_U16L_AS(sampleCount);
d->properties.setSampleLength(length);
d->properties.setTableLength(length);
d->properties.setInstrumentCount(instrumentCount);
d->properties.setSampleCount(sampleCount);
READ_U16L(d->properties.setPatternCount);

View File

@ -28,7 +28,7 @@ class IT::Properties::PropertiesPrivate
{
public:
PropertiesPrivate() :
sampleLength(0),
tableLength(0),
stereo(false),
instrumentCount(0),
sampleCount(0),
@ -43,7 +43,7 @@ public:
{
}
ushort sampleLength;
ushort tableLength;
bool stereo;
ushort instrumentCount;
ushort sampleCount;
@ -88,9 +88,9 @@ int IT::Properties::channels() const
return d->stereo ? 2 : 1;
}
ushort IT::Properties::sampleLength() const
ushort IT::Properties::tableLength() const
{
return d->sampleLength;
return d->tableLength;
}
bool IT::Properties::stereo() const
@ -148,9 +148,9 @@ uchar IT::Properties::bpmSpeed() const
return d->bpmSpeed;
}
void IT::Properties::setSampleLength(ushort sampleLength)
void IT::Properties::setTableLength(ushort tableLength)
{
d->sampleLength = sampleLength;
d->tableLength = tableLength;
}
void IT::Properties::setStereo(bool stereo)

View File

@ -38,7 +38,7 @@ namespace TagLib {
int sampleRate() const;
int channels() const;
ushort sampleLength() const;
ushort tableLength() const;
bool stereo() const;
ushort instrumentCount() const;
ushort sampleCount() const;
@ -52,7 +52,7 @@ namespace TagLib {
uchar bpmSpeed() const;
protected:
void setSampleLength(ushort sampleLength);
void setTableLength(ushort tableLength);
void setStereo(bool stereo);
void setInstrumentCount(ushort instrumentCount);