Adapt most changes from taglib2
This commit is contained in:
8
3rdparty/taglib/s3m/s3mfile.cpp
vendored
8
3rdparty/taglib/s3m/s3mfile.cpp
vendored
@@ -65,14 +65,6 @@ Mod::Tag *S3M::File::tag() const {
|
||||
return &d->tag;
|
||||
}
|
||||
|
||||
PropertyMap S3M::File::properties() const {
|
||||
return d->tag.properties();
|
||||
}
|
||||
|
||||
PropertyMap S3M::File::setProperties(const PropertyMap &properties) {
|
||||
return d->tag.setProperties(properties);
|
||||
}
|
||||
|
||||
S3M::AudioProperties *S3M::File::audioProperties() const {
|
||||
return &d->properties;
|
||||
}
|
||||
|
||||
22
3rdparty/taglib/s3m/s3mfile.h
vendored
22
3rdparty/taglib/s3m/s3mfile.h
vendored
@@ -60,27 +60,15 @@ class TAGLIB_EXPORT File : public Mod::FileBase {
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
virtual ~File();
|
||||
~File() override;
|
||||
|
||||
Mod::Tag *tag() const;
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- export function.
|
||||
* Forwards to Mod::Tag::properties().
|
||||
*/
|
||||
PropertyMap properties() const;
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- import function.
|
||||
* Forwards to Mod::Tag::setProperties().
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
Mod::Tag *tag() const override;
|
||||
|
||||
/*!
|
||||
* Returns the S3M::AudioProperties for this file. If no audio properties
|
||||
* were read then this will return a null pointer.
|
||||
*/
|
||||
S3M::AudioProperties *audioProperties() const;
|
||||
S3M::AudioProperties *audioProperties() const override;
|
||||
|
||||
/*!
|
||||
* Save the file.
|
||||
@@ -88,10 +76,10 @@ class TAGLIB_EXPORT File : public Mod::FileBase {
|
||||
*
|
||||
* \note Saving ScreamTracker III tags is not supported.
|
||||
*/
|
||||
bool save();
|
||||
bool save() override;
|
||||
|
||||
private:
|
||||
explicit File(const File &);
|
||||
File(const File &);
|
||||
File &operator=(const File &);
|
||||
|
||||
void read(bool readProperties);
|
||||
|
||||
30
3rdparty/taglib/s3m/s3mproperties.cpp
vendored
30
3rdparty/taglib/s3m/s3mproperties.cpp
vendored
@@ -31,18 +31,18 @@ using namespace S3M;
|
||||
|
||||
class S3M::AudioProperties::AudioPropertiesPrivate {
|
||||
public:
|
||||
AudioPropertiesPrivate() : lengthInPatterns(0),
|
||||
channels(0),
|
||||
stereo(false),
|
||||
sampleCount(0),
|
||||
patternCount(0),
|
||||
flags(0),
|
||||
trackerVersion(0),
|
||||
fileFormatVersion(0),
|
||||
globalVolume(0),
|
||||
masterVolume(0),
|
||||
tempo(0),
|
||||
bpmSpeed(0) {
|
||||
explicit AudioPropertiesPrivate() : lengthInPatterns(0),
|
||||
channels(0),
|
||||
stereo(false),
|
||||
sampleCount(0),
|
||||
patternCount(0),
|
||||
flags(0),
|
||||
trackerVersion(0),
|
||||
fileFormatVersion(0),
|
||||
globalVolume(0),
|
||||
masterVolume(0),
|
||||
tempo(0),
|
||||
bpmSpeed(0) {
|
||||
}
|
||||
|
||||
unsigned short lengthInPatterns;
|
||||
@@ -59,7 +59,7 @@ class S3M::AudioProperties::AudioPropertiesPrivate {
|
||||
unsigned char bpmSpeed;
|
||||
};
|
||||
|
||||
S3M::AudioProperties::AudioProperties(AudioProperties::ReadStyle propertiesStyle) : Strawberry_TagLib::TagLib::AudioProperties(propertiesStyle), d(new AudioPropertiesPrivate()) {}
|
||||
S3M::AudioProperties::AudioProperties(AudioProperties::ReadStyle) : Strawberry_TagLib::TagLib::AudioProperties(), d(new AudioPropertiesPrivate()) {}
|
||||
|
||||
S3M::AudioProperties::~AudioProperties() {
|
||||
delete d;
|
||||
@@ -129,6 +129,10 @@ unsigned char S3M::AudioProperties::bpmSpeed() const {
|
||||
return d->bpmSpeed;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void S3M::AudioProperties::setLengthInPatterns(unsigned short lengthInPatterns) {
|
||||
d->lengthInPatterns = lengthInPatterns;
|
||||
}
|
||||
|
||||
18
3rdparty/taglib/s3m/s3mproperties.h
vendored
18
3rdparty/taglib/s3m/s3mproperties.h
vendored
@@ -48,14 +48,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
|
||||
CustomData = 128
|
||||
};
|
||||
|
||||
explicit AudioProperties(AudioProperties::ReadStyle propertiesStyle);
|
||||
virtual ~AudioProperties();
|
||||
explicit AudioProperties(AudioProperties::ReadStyle);
|
||||
~AudioProperties() override;
|
||||
|
||||
int lengthInSeconds() const;
|
||||
int lengthInMilliseconds() const;
|
||||
int bitrate() const;
|
||||
int sampleRate() const;
|
||||
int channels() const;
|
||||
int lengthInSeconds() const override;
|
||||
int lengthInMilliseconds() const override;
|
||||
int bitrate() const override;
|
||||
int sampleRate() const override;
|
||||
int channels() const override;
|
||||
|
||||
unsigned short lengthInPatterns() const;
|
||||
bool stereo() const;
|
||||
@@ -69,6 +69,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
|
||||
unsigned char tempo() const;
|
||||
unsigned char bpmSpeed() const;
|
||||
|
||||
private:
|
||||
void setChannels(int channels);
|
||||
|
||||
void setLengthInPatterns(unsigned short lengthInPatterns);
|
||||
@@ -84,9 +85,6 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
|
||||
void setBpmSpeed(unsigned char bpmSpeed);
|
||||
|
||||
private:
|
||||
explicit AudioProperties(const AudioProperties&);
|
||||
AudioProperties &operator=(const AudioProperties&);
|
||||
|
||||
class AudioPropertiesPrivate;
|
||||
AudioPropertiesPrivate *d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user