diff options
Diffstat (limited to 'taglib/riff/wav/wavfile.cpp')
-rw-r--r-- | taglib/riff/wav/wavfile.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/taglib/riff/wav/wavfile.cpp b/taglib/riff/wav/wavfile.cpp index 79ff9167..0ebe21c3 100644 --- a/taglib/riff/wav/wavfile.cpp +++ b/taglib/riff/wav/wavfile.cpp @@ -23,10 +23,11 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include "tbytevector.h" -#include "tdebug.h" -#include "tstringlist.h" -#include "tpropertymap.h" +#include <tbytevector.h> +#include <tdebug.h> +#include <tstringlist.h> +#include <tpropertymap.h> +#include <tagutils.h> #include "wavfile.h" #include "id3v2tag.h" @@ -61,6 +62,18 @@ public: }; //////////////////////////////////////////////////////////////////////////////// +// static members +//////////////////////////////////////////////////////////////////////////////// + +bool RIFF::WAV::File::isSupported(IOStream *stream) +{ + // A WAV file has to start with "RIFF????WAVE". + + const ByteVector id = Utils::readHeader(stream, 12, false); + return (id.startsWith("RIFF") && id.containsAt("WAVE", 8)); +} + +//////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// |