mirror of
https://github.com/taglib/taglib.git
synced 2025-11-16 22:52:57 -05:00
Refactored AudioProperties classes in some ways
This commit is contained in:
@ -37,9 +37,7 @@ public:
|
||||
sampleCount(0),
|
||||
flags(0),
|
||||
tempo(0),
|
||||
bpmSpeed(0)
|
||||
{
|
||||
}
|
||||
bpmSpeed(0) {}
|
||||
|
||||
ushort lengthInPatterns;
|
||||
int channels;
|
||||
@ -53,9 +51,12 @@ public:
|
||||
ushort bpmSpeed;
|
||||
};
|
||||
|
||||
XM::AudioProperties::AudioProperties(AudioProperties::ReadStyle propertiesStyle)
|
||||
: TagLib::AudioProperties(propertiesStyle)
|
||||
, d(new PropertiesPrivate)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XM::AudioProperties::AudioProperties(AudioProperties::ReadStyle propertiesStyle) :
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
@ -129,6 +130,10 @@ TagLib::ushort XM::AudioProperties::bpmSpeed() const
|
||||
return d->bpmSpeed;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void XM::AudioProperties::setLengthInPatterns(ushort lengthInPatterns)
|
||||
{
|
||||
d->lengthInPatterns = lengthInPatterns;
|
||||
|
||||
@ -27,9 +27,15 @@
|
||||
#include "audioproperties.h"
|
||||
|
||||
namespace TagLib {
|
||||
|
||||
namespace XM {
|
||||
class AudioProperties : public TagLib::AudioProperties {
|
||||
|
||||
class File;
|
||||
|
||||
class AudioProperties : public TagLib::AudioProperties
|
||||
{
|
||||
friend class File;
|
||||
|
||||
public:
|
||||
/*! Flag bits. */
|
||||
enum {
|
||||
@ -54,6 +60,7 @@ namespace TagLib {
|
||||
ushort tempo() const;
|
||||
ushort bpmSpeed() const;
|
||||
|
||||
private:
|
||||
void setChannels(int channels);
|
||||
|
||||
void setLengthInPatterns(ushort lengthInPatterns);
|
||||
@ -66,10 +73,6 @@ namespace TagLib {
|
||||
void setTempo(ushort tempo);
|
||||
void setBpmSpeed(ushort bpmSpeed);
|
||||
|
||||
private:
|
||||
AudioProperties(const AudioProperties&);
|
||||
AudioProperties &operator=(const AudioProperties&);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user