From b6a8526b9e8bbe3be1df31b45e11985cb75d40fd Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 02:24:23 -0600 Subject: Fix prior commit --- src/metadata/wavpack/Makefile.am | 4 +- .../wavpack/taglib_wavpackfiletyperesolver.cpp | 44 ++++++++++++++++++++++ .../wavpack/taglib_wavpackfiletyperesolver.h | 36 ++++++++++++++++++ .../wavpack/taglib_wavpactdefiletyperesolver.cpp | 44 ---------------------- .../wavpack/taglib_wavpactdefiletyperesolver.h | 36 ------------------ 5 files changed, 82 insertions(+), 82 deletions(-) create mode 100644 src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp create mode 100644 src/metadata/wavpack/taglib_wavpackfiletyperesolver.h delete mode 100644 src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp delete mode 100644 src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h (limited to 'src/metadata/wavpack') diff --git a/src/metadata/wavpack/Makefile.am b/src/metadata/wavpack/Makefile.am index 64f60b6..93a98c6 100644 --- a/src/metadata/wavpack/Makefile.am +++ b/src/metadata/wavpack/Makefile.am @@ -8,9 +8,9 @@ noinst_LTLIBRARIES = libtagwavpack.la libtagwavpack_la_SOURCES = \ wvfile.cpp \ wvproperties.cpp \ - taglib_wavpactdefiletyperesolver.cpp + taglib_wavpackfiletyperesolver.cpp noinst_HEADERS = wvfile.h \ wvproperties.h \ - taglib_wavpactdefiletyperesolver.h + taglib_wavpackfiletyperesolver.h diff --git a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp new file mode 100644 index 0000000..fe289a2 --- /dev/null +++ b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp @@ -0,0 +1,44 @@ +/*************************************************************************** + copyright : (C) 2006 by Martin Aumueller + email : aumuell@reserv.at + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ***************************************************************************/ + +#include "taglib_wavpackfiletyperesolver.h" +#include "wvfile.h" + +#include + +TagLib::File *WavPackFileTypeResolver::createFile(const char *fileName, + bool readProperties, + TagLib::AudioProperties::ReadStyle propertiesStyle) const +{ + const char *ext = strrchr(fileName, '.'); + if(ext && !strcasecmp(ext, ".wv")) + { + TagLib::WavPack::File *f = new TagLib::WavPack::File(fileName, readProperties, propertiesStyle); + if(f->isValid()) + return f; + else + { + delete f; + } + } + + return 0; +} diff --git a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h new file mode 100644 index 0000000..b9d4500 --- /dev/null +++ b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h @@ -0,0 +1,36 @@ +/*************************************************************************** + copyright : (C) 2006 by Martin Aumueller + email : aumuell@reserv.at + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef TAGLIB_WAVPACKFILETYPERESOLVER_H +#define TAGLIB_WAVPACKFILETYPERESOLVER_H + +#include +#include + + +class WavPackFileTypeResolver : public TagLib::FileRef::FileTypeResolver +{ + TagLib::File *createFile(const char *fileName, + bool readAudioProperties, + TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; +}; + +#endif diff --git a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp deleted file mode 100644 index feadd8b..0000000 --- a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - copyright : (C) 2006 by Martin Aumueller - email : aumuell@reserv.at - ***************************************************************************/ - -/*************************************************************************** - * This library is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License version * - * 2.1 as published by the Free Software Foundation. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ***************************************************************************/ - -#include "taglib_wavpactdefiletyperesolver.h" -#include "wvfile.h" - -#include - -TagLib::File *WavPackFileTypeResolver::createFile(const char *fileName, - bool readProperties, - TagLib::AudioProperties::ReadStyle propertiesStyle) const -{ - const char *ext = strrchr(fileName, '.'); - if(ext && !strcasecmp(ext, ".wv")) - { - TagLib::WavPack::File *f = new TagLib::WavPack::File(fileName, readProperties, propertiesStyle); - if(f->isValid()) - return f; - else - { - delete f; - } - } - - return 0; -} diff --git a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h deleted file mode 100644 index b9d4500..0000000 --- a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h +++ /dev/null @@ -1,36 +0,0 @@ -/*************************************************************************** - copyright : (C) 2006 by Martin Aumueller - email : aumuell@reserv.at - ***************************************************************************/ - -/*************************************************************************** - * This library is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License version * - * 2.1 as published by the Free Software Foundation. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef TAGLIB_WAVPACKFILETYPERESOLVER_H -#define TAGLIB_WAVPACKFILETYPERESOLVER_H - -#include -#include - - -class WavPackFileTypeResolver : public TagLib::FileRef::FileTypeResolver -{ - TagLib::File *createFile(const char *fileName, - bool readAudioProperties, - TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; -}; - -#endif -- cgit v1.2.1