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:
@ -32,7 +32,13 @@ using namespace TagLib;
|
||||
class ASF::AudioProperties::PropertiesPrivate
|
||||
{
|
||||
public:
|
||||
PropertiesPrivate(): length(0), bitrate(0), sampleRate(0), channels(0), encrypted(false) {}
|
||||
PropertiesPrivate() :
|
||||
length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
encrypted(false) {}
|
||||
|
||||
int length;
|
||||
int bitrate;
|
||||
int sampleRate;
|
||||
@ -44,16 +50,14 @@ public:
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ASF::AudioProperties::AudioProperties()
|
||||
: TagLib::AudioProperties(AudioProperties::Average)
|
||||
ASF::AudioProperties::AudioProperties() :
|
||||
d(new PropertiesPrivate())
|
||||
{
|
||||
d = new PropertiesPrivate;
|
||||
}
|
||||
|
||||
ASF::AudioProperties::~AudioProperties()
|
||||
{
|
||||
if(d)
|
||||
delete d;
|
||||
delete d;
|
||||
}
|
||||
|
||||
int ASF::AudioProperties::length() const
|
||||
|
||||
@ -34,13 +34,16 @@ namespace TagLib {
|
||||
|
||||
namespace ASF {
|
||||
|
||||
class File;
|
||||
|
||||
//! An implementation of ASF audio properties
|
||||
class TAGLIB_EXPORT AudioProperties : public TagLib::AudioProperties
|
||||
{
|
||||
public:
|
||||
friend class File;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of ASF::AudioProperties.
|
||||
* Creates an instance of ASF::AudioProperties.
|
||||
*/
|
||||
AudioProperties();
|
||||
|
||||
@ -50,21 +53,20 @@ namespace TagLib {
|
||||
virtual ~AudioProperties();
|
||||
|
||||
// Reimplementations.
|
||||
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
virtual int sampleRate() const;
|
||||
virtual int channels() const;
|
||||
bool isEncrypted() const;
|
||||
|
||||
#ifndef DO_NOT_DOCUMENT
|
||||
private:
|
||||
void setLength(int value);
|
||||
void setBitrate(int value);
|
||||
void setSampleRate(int value);
|
||||
void setChannels(int value);
|
||||
void setEncrypted(bool value);
|
||||
#endif
|
||||
|
||||
private:
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user