taglib: Rename Properties to AudioProperties
This commit is contained in:
12
3rdparty/taglib/dsdiff/dsdifffile.cpp
vendored
12
3rdparty/taglib/dsdiff/dsdifffile.cpp
vendored
@@ -118,7 +118,7 @@ class DSDIFF::File::FilePrivate {
|
||||
*/
|
||||
int duplicateID3V2chunkIndex;
|
||||
|
||||
Properties *properties;
|
||||
AudioProperties *properties;
|
||||
|
||||
TagUnion tag;
|
||||
|
||||
@@ -145,7 +145,7 @@ bool DSDIFF::File::isSupported(IOStream *stream) {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DSDIFF::File::File(FileName file, bool readProperties, Properties::ReadStyle propertiesStyle) : Strawberry_TagLib::TagLib::File(file) {
|
||||
DSDIFF::File::File(FileName file, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : Strawberry_TagLib::TagLib::File(file) {
|
||||
|
||||
d = new FilePrivate;
|
||||
d->endianness = BigEndian;
|
||||
@@ -154,7 +154,7 @@ DSDIFF::File::File(FileName file, bool readProperties, Properties::ReadStyle pro
|
||||
|
||||
}
|
||||
|
||||
DSDIFF::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle propertiesStyle) : Strawberry_TagLib::TagLib::File(stream) {
|
||||
DSDIFF::File::File(IOStream *stream, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : Strawberry_TagLib::TagLib::File(stream) {
|
||||
|
||||
d = new FilePrivate;
|
||||
d->endianness = BigEndian;
|
||||
@@ -210,7 +210,7 @@ PropertyMap DSDIFF::File::setProperties(const PropertyMap &properties) {
|
||||
return d->tag.access<ID3v2::Tag>(ID3v2Index, true)->setProperties(properties);
|
||||
}
|
||||
|
||||
DSDIFF::Properties *DSDIFF::File::audioProperties() const {
|
||||
DSDIFF::AudioProperties *DSDIFF::File::audioProperties() const {
|
||||
return d->properties;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ void DSDIFF::File::updateRootChunksStructure(unsigned int startingChunk) {
|
||||
|
||||
}
|
||||
|
||||
void DSDIFF::File::read(bool readProperties, Properties::ReadStyle propertiesStyle) {
|
||||
void DSDIFF::File::read(bool readProperties, AudioProperties::ReadStyle propertiesStyle) {
|
||||
|
||||
bool bigEndian = (d->endianness == BigEndian);
|
||||
|
||||
@@ -868,7 +868,7 @@ void DSDIFF::File::read(bool readProperties, Properties::ReadStyle propertiesSty
|
||||
if (lengthDSDSamplesTimeChannels > 0)
|
||||
bitrate = (audioDataSizeinBytes * 8 * sampleRate) / lengthDSDSamplesTimeChannels / 1000;
|
||||
|
||||
d->properties = new Properties(sampleRate, channels, lengthDSDSamplesTimeChannels, bitrate, propertiesStyle);
|
||||
d->properties = new AudioProperties(sampleRate, channels, lengthDSDSamplesTimeChannels, bitrate, propertiesStyle);
|
||||
}
|
||||
|
||||
if (!ID3v2Tag()) {
|
||||
|
||||
10
3rdparty/taglib/dsdiff/dsdifffile.h
vendored
10
3rdparty/taglib/dsdiff/dsdifffile.h
vendored
@@ -80,7 +80,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
*
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs an DSDIFF file from \a stream.
|
||||
@@ -91,7 +91,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
* \note In the current implementation, \a propertiesStyle is ignored.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true,
|
||||
Properties::ReadStyle propertiesStyle = Properties::Average);
|
||||
AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
@@ -144,10 +144,10 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
PropertyMap setProperties(const PropertyMap &properties);
|
||||
|
||||
/*!
|
||||
* Returns the AIFF::Properties for this file.
|
||||
* Returns the AIFF::AudioProperties for this file.
|
||||
* If no audio properties were read then this will return a null pointer.
|
||||
*/
|
||||
virtual Properties *audioProperties() const;
|
||||
virtual AudioProperties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Save the file. If at least one tag -- ID3v1 or DIIN -- exists this will duplicate its content into the other tag.
|
||||
@@ -254,7 +254,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
|
||||
|
||||
void updateRootChunksStructure(unsigned int startingChunk);
|
||||
|
||||
void read(bool readProperties, Properties::ReadStyle propertiesStyle);
|
||||
void read(bool readProperties, AudioProperties::ReadStyle propertiesStyle);
|
||||
void writeChunk(const ByteVector &name, const ByteVector &data, unsigned long long offset, unsigned long replace = 0, unsigned int leadingPadding = 0);
|
||||
|
||||
class FilePrivate;
|
||||
|
||||
28
3rdparty/taglib/dsdiff/dsdiffproperties.cpp
vendored
28
3rdparty/taglib/dsdiff/dsdiffproperties.cpp
vendored
@@ -30,9 +30,9 @@
|
||||
|
||||
using namespace Strawberry_TagLib::TagLib;
|
||||
|
||||
class DSDIFF::Properties::PropertiesPrivate {
|
||||
class DSDIFF::AudioProperties::AudioPropertiesPrivate {
|
||||
public:
|
||||
PropertiesPrivate() : length(0),
|
||||
AudioPropertiesPrivate() : length(0),
|
||||
bitrate(0),
|
||||
sampleRate(0),
|
||||
channels(0),
|
||||
@@ -52,9 +52,9 @@ class DSDIFF::Properties::PropertiesPrivate {
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DSDIFF::Properties::Properties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style) : AudioProperties(style) {
|
||||
DSDIFF::AudioProperties::AudioProperties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style) : Strawberry_TagLib::TagLib::AudioProperties(style) {
|
||||
|
||||
d = new PropertiesPrivate;
|
||||
d = new AudioPropertiesPrivate;
|
||||
|
||||
d->channels = channels;
|
||||
d->sampleCount = samplesCount;
|
||||
@@ -65,38 +65,34 @@ DSDIFF::Properties::Properties(const unsigned int sampleRate, const unsigned sho
|
||||
|
||||
}
|
||||
|
||||
DSDIFF::Properties::~Properties() {
|
||||
DSDIFF::AudioProperties::~AudioProperties() {
|
||||
delete d;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::length() const {
|
||||
return lengthInSeconds();
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::lengthInSeconds() const {
|
||||
int DSDIFF::AudioProperties::lengthInSeconds() const {
|
||||
return d->length / 1000;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::lengthInMilliseconds() const {
|
||||
int DSDIFF::AudioProperties::lengthInMilliseconds() const {
|
||||
return d->length;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::bitrate() const {
|
||||
int DSDIFF::AudioProperties::bitrate() const {
|
||||
return d->bitrate;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::sampleRate() const {
|
||||
int DSDIFF::AudioProperties::sampleRate() const {
|
||||
return d->sampleRate;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::channels() const {
|
||||
int DSDIFF::AudioProperties::channels() const {
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
int DSDIFF::Properties::bitsPerSample() const {
|
||||
int DSDIFF::AudioProperties::bitsPerSample() const {
|
||||
return d->sampleWidth;
|
||||
}
|
||||
|
||||
long long DSDIFF::Properties::sampleCount() const {
|
||||
long long DSDIFF::AudioProperties::sampleCount() const {
|
||||
return d->sampleCount;
|
||||
}
|
||||
|
||||
19
3rdparty/taglib/dsdiff/dsdiffproperties.h
vendored
19
3rdparty/taglib/dsdiff/dsdiffproperties.h
vendored
@@ -40,21 +40,20 @@ class File;
|
||||
* This reads the data from an DSDIFF stream found in the AudioProperties API.
|
||||
*/
|
||||
|
||||
class TAGLIB_EXPORT Properties : public Strawberry_TagLib::TagLib::AudioProperties {
|
||||
class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioProperties {
|
||||
public:
|
||||
/*!
|
||||
* Create an instance of DSDIFF::Properties with the data read from the ByteVector \a data.
|
||||
* Create an instance of DSDIFF::AudioProperties with the data read from the ByteVector \a data.
|
||||
*/
|
||||
Properties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style);
|
||||
AudioProperties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style);
|
||||
|
||||
/*!
|
||||
* Destroys this DSDIFF::Properties instance.
|
||||
* Destroys this DSDIFF::AudioProperties instance.
|
||||
*/
|
||||
virtual ~Properties();
|
||||
virtual ~AudioProperties();
|
||||
|
||||
// Reimplementations.
|
||||
|
||||
virtual int length() const;
|
||||
virtual int lengthInSeconds() const;
|
||||
virtual int lengthInMilliseconds() const;
|
||||
virtual int bitrate() const;
|
||||
@@ -65,11 +64,11 @@ class TAGLIB_EXPORT Properties : public Strawberry_TagLib::TagLib::AudioProperti
|
||||
long long sampleCount() const;
|
||||
|
||||
private:
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
AudioProperties(const AudioProperties &);
|
||||
AudioProperties &operator=(const AudioProperties &);
|
||||
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
class AudioPropertiesPrivate;
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace DSDIFF
|
||||
|
||||
Reference in New Issue
Block a user