aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/ape/apefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'taglib/ape/apefile.cpp')
-rw-r--r--taglib/ape/apefile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/taglib/ape/apefile.cpp b/taglib/ape/apefile.cpp
index 9f298aaf..a10c1f64 100644
--- a/taglib/ape/apefile.cpp
+++ b/taglib/ape/apefile.cpp
@@ -84,6 +84,18 @@ public:
};
////////////////////////////////////////////////////////////////////////////////
+// static members
+////////////////////////////////////////////////////////////////////////////////
+
+bool APE::File::isSupported(IOStream *stream)
+{
+ // An APE file has an ID "MAC " somewhere. An ID3v2 tag may precede.
+
+ const ByteVector buffer = Utils::readHeader(stream, bufferSize(), true);
+ return (buffer.find("MAC ") >= 0);
+}
+
+////////////////////////////////////////////////////////////////////////////////
// public members
////////////////////////////////////////////////////////////////////////////////