diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
commit | f2cfda2a54780868dfe0af7bd652fcd4906547da (patch) | |
tree | c6ac23545528f5701818424f2af5f79ce3665e6c /src/metadata/ape | |
download | soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip |
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/metadata/ape')
-rwxr-xr-x | src/metadata/ape/Makefile.am | 6 | ||||
-rwxr-xr-x | src/metadata/ape/taglib_monkeysaudiofiletyperesolver.cpp | 21 | ||||
-rwxr-xr-x | src/metadata/ape/taglib_monkeysaudiofiletyperesolver.h | 19 |
3 files changed, 46 insertions, 0 deletions
diff --git a/src/metadata/ape/Makefile.am b/src/metadata/ape/Makefile.am new file mode 100755 index 0000000..156cf91 --- /dev/null +++ b/src/metadata/ape/Makefile.am @@ -0,0 +1,6 @@ +INCLUDES = $(all_includes) $(taglib_includes) +METASOURCES = AUTO +libtagmonkeysaudio_la_LDFLAGS = $(all_libraries) +noinst_LTLIBRARIES = libtagmonkeysaudio.la +noinst_HEADERS = taglib_monkeysaudiofiletyperesolver.h +libtagmonkeysaudio_la_SOURCES = taglib_monkeysaudiofiletyperesolver.cpp diff --git a/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.cpp b/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.cpp new file mode 100755 index 0000000..fea0344 --- /dev/null +++ b/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.cpp @@ -0,0 +1,21 @@ +// (c) 2006 Martin Aumueller <[email protected]> +// modified 2006 Daniel Faust <[email protected]> +// See COPYING file for licensing information + +#include "taglib_monkeysaudiofiletyperesolver.h" +#include <taglib/mpcfile.h> + +#include <string.h> + +TagLib::File *MonkeysAudioFileTypeResolver::createFile(const char *fileName, + bool readProperties, + TagLib::AudioProperties::ReadStyle propertiesStyle) const +{ + const char *ext = strrchr(fileName, '.'); + if(ext && (!strcasecmp(ext, ".ape") || !strcasecmp(ext, ".mac"))) + { + return new TagLib::MPC::File(fileName, readProperties, propertiesStyle); + } + + return 0; +} diff --git a/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.h b/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.h new file mode 100755 index 0000000..4af4a7b --- /dev/null +++ b/src/metadata/ape/taglib_monkeysaudiofiletyperesolver.h @@ -0,0 +1,19 @@ +// (c) 2006 Martin Aumueller <[email protected]> +// modified 2006 Daniel Faust <[email protected]> +// See COPYING file for licensing information + +#ifndef TAGLIB_MONKEYSAUDIOFILETYPERESOLVER_H +#define TAGLIB_MONKEYSAUDIOFILETYPERESOLVER_H + +#include <taglib/tfile.h> +#include <taglib/fileref.h> + + +class MonkeysAudioFileTypeResolver : public TagLib::FileRef::FileTypeResolver +{ + TagLib::File *createFile(const char *fileName, + bool readAudioProperties, + TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; +}; + +#endif |