diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-19 07:22:43 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-19 07:22:43 +0000 |
| commit | 5cc2fd08ae492ac9eba82675326475f88e40d8d2 (patch) | |
| tree | c0aca10334764ba1c9a2befe0f8fdbc40546bf11 /src/plugins/Input/sndfile/decodersndfilefactory.cpp | |
| parent | f7426acabe8ab4f89783bbc042e1724a56dce917 (diff) | |
| download | qmmp-5cc2fd08ae492ac9eba82675326475f88e40d8d2.tar.gz qmmp-5cc2fd08ae492ac9eba82675326475f88e40d8d2.tar.bz2 qmmp-5cc2fd08ae492ac9eba82675326475f88e40d8d2.zip | |
sndfile plugin: using QIODevice-based input
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6581 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/sndfile/decodersndfilefactory.cpp')
| -rw-r--r-- | src/plugins/Input/sndfile/decodersndfilefactory.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index bf062aa55..90cb00711 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp @@ -29,14 +29,12 @@ #include "decoder_sndfile.h" #include "decodersndfilefactory.h" - // DecoderSndFileFactory - bool DecoderSndFileFactory::supports(const QString &source) const { if (source.endsWith(".wav", Qt::CaseInsensitive)) { - //try top open the file + //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); @@ -75,14 +73,13 @@ const DecoderProperties DecoderSndFileFactory::properties() const properties.shortName = "sndfile"; properties.hasAbout = true; properties.hasSettings = false; - properties.noInput = true; - properties.protocols << "file"; + properties.noInput = false; return properties; } -Decoder *DecoderSndFileFactory::create(const QString &path, QIODevice *) +Decoder *DecoderSndFileFactory::create(const QString &path, QIODevice *input) { - return new DecoderSndFile(path); + return new DecoderSndFile(input); } QList<FileInfo *> DecoderSndFileFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) |
