From 5cc2fd08ae492ac9eba82675326475f88e40d8d2 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 19 Jul 2016 07:22:43 +0000 Subject: 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 --- src/plugins/Input/sndfile/decodersndfilefactory.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/plugins/Input/sndfile/decodersndfilefactory.cpp') 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(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 DecoderSndFileFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) -- cgit v1.2.3-13-gbd6f