diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-26 08:58:59 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-26 08:58:59 +0000 |
| commit | 45b203105b980162549fc97106c6353a23571106 (patch) | |
| tree | e81c2e5db07e3643b59e6d653195e40fa34855c1 /src/plugins/Input/sndfile | |
| parent | 62904593cc27e86a32aa07f43108a160ec52371d (diff) | |
| download | qmmp-45b203105b980162549fc97106c6353a23571106.tar.gz qmmp-45b203105b980162549fc97106c6353a23571106.tar.bz2 qmmp-45b203105b980162549fc97106c6353a23571106.zip | |
removed function DecoderFactory::supports
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6603 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/sndfile')
| -rw-r--r-- | src/plugins/Input/sndfile/decodersndfilefactory.cpp | 27 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/decodersndfilefactory.h | 1 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index bfca5c713..f66a4f192 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp @@ -36,33 +36,6 @@ #define WAVE_FORMAT_MULAW 0x0007 // DecoderSndFileFactory -bool DecoderSndFileFactory::supports(const QString &source) const -{ - if (source.endsWith(".wav", Qt::CaseInsensitive)) - { - //try to open the file - SF_INFO snd_info; -#ifdef Q_OS_WIN - SNDFILE *sndfile = sf_wchar_open(reinterpret_cast<LPCWSTR>(source.utf16()), SFM_READ, &snd_info); -#else - SNDFILE *sndfile = sf_open(source.toLocal8Bit().constData(), SFM_READ, &snd_info); -#endif - if (!sndfile) - return false; - - sf_close (sndfile); - sndfile = 0; - return true; - } - foreach(QString filter, properties().filters) - { - QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); - if (regexp.exactMatch(source)) - return true; - } - return false; -} - bool DecoderSndFileFactory::canDecode(QIODevice *input) const { char buf[36]; diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.h b/src/plugins/Input/sndfile/decodersndfilefactory.h index 150b89d1c..d86bd68c1 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.h +++ b/src/plugins/Input/sndfile/decodersndfilefactory.h @@ -37,7 +37,6 @@ Q_OBJECT Q_INTERFACES(DecoderFactory) public: - bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); |
