Additional manual formatting to taglib sources
This commit is contained in:
12
3rdparty/taglib/xm/xmfile.cpp
vendored
12
3rdparty/taglib/xm/xmfile.cpp
vendored
@@ -70,8 +70,7 @@ class Reader {
|
||||
}
|
||||
|
||||
/*!
|
||||
* Reads associated values from \a file, but never reads more
|
||||
* then \a limit bytes.
|
||||
* Reads associated values from \a file, but never reads more then \a limit bytes.
|
||||
*/
|
||||
virtual unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) = 0;
|
||||
|
||||
@@ -112,10 +111,10 @@ class ValueReader : public Reader {
|
||||
|
||||
class StringReader : public ValueReader<String> {
|
||||
public:
|
||||
StringReader(String &string, unsigned int size) : ValueReader<String>(string), m_size(size) {
|
||||
}
|
||||
StringReader(String &string, unsigned int size) : ValueReader<String>(string), m_size(size) {}
|
||||
|
||||
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) {
|
||||
|
||||
ByteVector data = file.readBlock(std::min(m_size, limit));
|
||||
unsigned int count = data.size();
|
||||
int index = data.find((char)0);
|
||||
@@ -125,6 +124,7 @@ class StringReader : public ValueReader<String> {
|
||||
data.replace('\xff', ' ');
|
||||
value = data;
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
unsigned int size() const {
|
||||
@@ -349,6 +349,7 @@ XM::Properties *XM::File::audioProperties() const {
|
||||
}
|
||||
|
||||
bool XM::File::save() {
|
||||
|
||||
if (readOnly()) {
|
||||
debug("XM::File::save() - Cannot save to a read only file.");
|
||||
return false;
|
||||
@@ -440,9 +441,11 @@ bool XM::File::save() {
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void XM::File::read(bool) {
|
||||
|
||||
if (!isOpen())
|
||||
return;
|
||||
|
||||
@@ -589,4 +592,5 @@ void XM::File::read(bool) {
|
||||
comment += sampleNames.toString("\n");
|
||||
}
|
||||
d->tag.setComment(comment);
|
||||
|
||||
}
|
||||
|
||||
69
3rdparty/taglib/xm/xmfile.h
vendored
69
3rdparty/taglib/xm/xmfile.h
vendored
@@ -35,67 +35,59 @@
|
||||
|
||||
namespace Strawberry_TagLib {
|
||||
namespace TagLib {
|
||||
|
||||
namespace XM {
|
||||
|
||||
class TAGLIB_EXPORT File : public Mod::FileBase {
|
||||
public:
|
||||
/*!
|
||||
* Constructs an Extended Module file from \a file.
|
||||
*
|
||||
* \note In the current implementation, both \a readProperties and
|
||||
* \a propertiesStyle are ignored. The audio properties are always
|
||||
* read.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true,
|
||||
AudioProperties::ReadStyle propertiesStyle =
|
||||
AudioProperties::Average);
|
||||
* Constructs an Extended Module file from \a file.
|
||||
*
|
||||
* \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored.
|
||||
* The audio properties are always read.
|
||||
*/
|
||||
File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Constructs an Extended Module file from \a stream.
|
||||
*
|
||||
* \note In the current implementation, both \a readProperties and
|
||||
* \a propertiesStyle are ignored. The audio properties are always
|
||||
* read.
|
||||
*
|
||||
* \note TagLib will *not* take ownership of the stream, the caller is
|
||||
* responsible for deleting it after the File object.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true,
|
||||
AudioProperties::ReadStyle propertiesStyle =
|
||||
AudioProperties::Average);
|
||||
* Constructs an Extended Module file from \a stream.
|
||||
*
|
||||
* \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored.
|
||||
* The audio properties are always read.
|
||||
*
|
||||
* \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object.
|
||||
*/
|
||||
File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
|
||||
|
||||
/*!
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
* Destroys this instance of the File.
|
||||
*/
|
||||
virtual ~File();
|
||||
|
||||
Mod::Tag *tag() const;
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- export function.
|
||||
* Forwards to Mod::Tag::properties().
|
||||
*/
|
||||
* 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().
|
||||
*/
|
||||
* Implements the unified property interface -- import function.
|
||||
* Forwards to Mod::Tag::setProperties().
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
|
||||
/*!
|
||||
* Returns the XM::Properties for this file. If no audio properties
|
||||
* were read then this will return a null pointer.
|
||||
*/
|
||||
* Returns the XM::Properties for this file.
|
||||
* If no audio properties were read then this will return a null pointer.
|
||||
*/
|
||||
XM::Properties *audioProperties() const;
|
||||
|
||||
/*!
|
||||
* Save the file.
|
||||
* This is the same as calling save(AllTags);
|
||||
*
|
||||
* \note Saving Extended Module tags is not supported.
|
||||
*/
|
||||
* Save the file.
|
||||
* This is the same as calling save(AllTags);
|
||||
*
|
||||
* \note Saving Extended Module tags is not supported.
|
||||
*/
|
||||
bool save();
|
||||
|
||||
private:
|
||||
@@ -107,6 +99,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase {
|
||||
class FilePrivate;
|
||||
FilePrivate *d;
|
||||
};
|
||||
|
||||
} // namespace XM
|
||||
} // namespace TagLib
|
||||
} // namespace Strawberry_TagLib
|
||||
|
||||
4
3rdparty/taglib/xm/xmproperties.cpp
vendored
4
3rdparty/taglib/xm/xmproperties.cpp
vendored
@@ -55,9 +55,7 @@ class XM::Properties::PropertiesPrivate {
|
||||
unsigned short bpmSpeed;
|
||||
};
|
||||
|
||||
XM::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) : AudioProperties(propertiesStyle),
|
||||
d(new PropertiesPrivate()) {
|
||||
}
|
||||
XM::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) : AudioProperties(propertiesStyle), d(new PropertiesPrivate()) {}
|
||||
|
||||
XM::Properties::~Properties() {
|
||||
delete d;
|
||||
|
||||
1
3rdparty/taglib/xm/xmproperties.h
vendored
1
3rdparty/taglib/xm/xmproperties.h
vendored
@@ -81,6 +81,7 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
|
||||
class PropertiesPrivate;
|
||||
PropertiesPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace XM
|
||||
} // namespace TagLib
|
||||
} // namespace Strawberry_TagLib
|
||||
|
||||
Reference in New Issue
Block a user