From 5a0c24b410839c2ceebee25b71f8ae682dfd84ed Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 02:16:46 -0600 Subject: Fix prior commit --- amarok/src/metadata/tplugins.cpp | 2 +- amarok/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 ------------------ 6 files changed, 83 insertions(+), 83 deletions(-) create mode 100644 amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp create mode 100644 amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h delete mode 100644 amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp delete mode 100644 amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h diff --git a/amarok/src/metadata/tplugins.cpp b/amarok/src/metadata/tplugins.cpp index a76297f1..d20e4bcc 100644 --- a/amarok/src/metadata/tplugins.cpp +++ b/amarok/src/metadata/tplugins.cpp @@ -39,7 +39,7 @@ #ifndef TAGLIB_15 #include "trueaudio/taglib_trueaudiofiletyperesolver.h" #include "trueaudio/ttafile.h" -#include "wavpack/taglib_wavpactdefiletyperesolver.h" +#include "wavpack/taglib_wavpackfiletyperesolver.h" #include "wavpack/wvfile.h" #include "speex/taglib_speexfiletyperesolver.h" #include "speex/speexfile.h" diff --git a/amarok/src/metadata/wavpack/Makefile.am b/amarok/src/metadata/wavpack/Makefile.am index 9a6df253..8a4c2d7a 100644 --- a/amarok/src/metadata/wavpack/Makefile.am +++ b/amarok/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/amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp b/amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp new file mode 100644 index 00000000..fe289a27 --- /dev/null +++ b/amarok/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/amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h b/amarok/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h new file mode 100644 index 00000000..b9d4500a --- /dev/null +++ b/amarok/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/amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp b/amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp deleted file mode 100644 index feadd8b2..00000000 --- a/amarok/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/amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h b/amarok/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h deleted file mode 100644 index b9d4500a..00000000 --- a/amarok/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.3