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

@ -101,7 +101,7 @@ void XM::File::read(bool)
READ_STRING(d->tag.setTrackerName, 20);
READ_U16L(d->properties.setVersion);
READ_U32L_AS(headerSize);
READ_U16L(d->properties.setSampleLength);
READ_U16L(d->properties.setTableLength);
READ_U16L(d->properties.setRestartPosition);
READ_U16L(d->properties.setChannels);
READ_U16L_AS(patternCount);

View File

@ -28,7 +28,7 @@ class XM::Properties::PropertiesPrivate
{
public:
PropertiesPrivate() :
sampleLength(0),
tableLength(0),
channels(0),
version(0),
restartPosition(0),
@ -40,7 +40,7 @@ public:
{
}
ushort sampleLength;
ushort tableLength;
int channels;
ushort version;
ushort restartPosition;
@ -82,9 +82,9 @@ int XM::Properties::channels() const
return d->channels;
}
ushort XM::Properties::sampleLength() const
ushort XM::Properties::tableLength() const
{
return d->sampleLength;
return d->tableLength;
}
ushort XM::Properties::version() const
@ -122,9 +122,9 @@ ushort XM::Properties::bpmSpeed() const
return d->bpmSpeed;
}
void XM::Properties::setSampleLength(int sampleLength)
void XM::Properties::setTableLength(ushort tableLength)
{
d->sampleLength = sampleLength;
d->tableLength = tableLength;
}
void XM::Properties::setChannels(int channels)

View File

@ -39,7 +39,7 @@ namespace TagLib {
int sampleRate() const;
int channels() const;
ushort sampleLength() const;
ushort tableLength() const;
ushort version() const;
ushort restartPosition() const;
ushort patternCount() const;
@ -49,7 +49,7 @@ namespace TagLib {
ushort bpmSpeed() const;
protected:
void setSampleLength(int sampleLength);
void setTableLength(ushort tableLength);
void setChannels(int channels);
void setVersion(ushort version);