aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/flac
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Input/flac')
-rw-r--r--src/plugins/Input/flac/decoder_flac.cpp4
-rw-r--r--src/plugins/Input/flac/decoderflacfactory.cpp4
-rw-r--r--src/plugins/Input/flac/flac.pro28
-rw-r--r--src/plugins/Input/flac/flacmetadatamodel.cpp4
4 files changed, 25 insertions, 15 deletions
diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp
index 2eecb7272..ee1972560 100644
--- a/src/plugins/Input/flac/decoder_flac.cpp
+++ b/src/plugins/Input/flac/decoder_flac.cpp
@@ -283,10 +283,10 @@ bool DecoderFLAC::initialize()
p.replace(QString(QUrl::toPercentEncoding("?")), "?");
p.replace(QString(QUrl::toPercentEncoding("%")), "%");
p.replace(QString(QUrl::toPercentEncoding(":")), ":");
- TagLib::FLAC::File fileRef(p.toLocal8Bit ());
+ TagLib::FLAC::File fileRef(p.toLocal8Bit().constData());
//looking for cuesheet comment
TagLib::Ogg::XiphComment *xiph_comment = fileRef.xiphComment();
- QList <FileInfo*> list;
+
if (xiph_comment && xiph_comment->fieldListMap().contains("CUESHEET"))
{
qDebug("DecoderFLAC: using cuesheet xiph comment.");
diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp
index c1eee4480..ed6f05705 100644
--- a/src/plugins/Input/flac/decoderflacfactory.cpp
+++ b/src/plugins/Input/flac/decoderflacfactory.cpp
@@ -102,13 +102,13 @@ QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bo
if(fileName.endsWith(".flac", Qt::CaseInsensitive))
{
- flacFile = new TagLib::FLAC::File(fileName.toLocal8Bit ());
+ flacFile = new TagLib::FLAC::File(fileName.toLocal8Bit().constData());
tag = useMetaData ? flacFile->xiphComment() : 0;
ap = flacFile->audioProperties();
}
else if(fileName.endsWith(".oga", Qt::CaseInsensitive))
{
- oggFlacFile = new TagLib::Ogg::FLAC::File(fileName.toLocal8Bit ());
+ oggFlacFile = new TagLib::Ogg::FLAC::File(fileName.toLocal8Bit().constData());
tag = useMetaData ? oggFlacFile->tag() : 0;
ap = oggFlacFile->audioProperties();
}
diff --git a/src/plugins/Input/flac/flac.pro b/src/plugins/Input/flac/flac.pro
index d39776fa2..e25230f23 100644
--- a/src/plugins/Input/flac/flac.pro
+++ b/src/plugins/Input/flac/flac.pro
@@ -11,7 +11,7 @@ SOURCES += decoder_flac.cpp \
flacmetadatamodel.cpp \
replaygainreader.cpp
TARGET = $$PLUGINS_PREFIX/Input/flac
-QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libflac.so
+
INCLUDEPATH += ../../../
CONFIG += release \
warn_on \
@@ -19,11 +19,8 @@ CONFIG += release \
link_pkgconfig
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-LIBS += -lqmmp \
- -L/usr/lib \
- -I/usr/include
-PKGCONFIG += taglib \
- flac
+
+
TRANSLATIONS = translations/flac_plugin_ru.ts \
translations/flac_plugin_uk_UA.ts \
translations/flac_plugin_zh_CN.ts \
@@ -39,6 +36,19 @@ TRANSLATIONS = translations/flac_plugin_ru.ts \
translations/flac_plugin_es.ts
RESOURCES = translations/translations.qrc
-isEmpty(LIB_DIR):LIB_DIR = /lib
-target.path = $$LIB_DIR/qmmp/Input
-INSTALLS += target
+
+unix {
+ isEmpty(LIB_DIR):LIB_DIR = /lib
+ target.path = $$LIB_DIR/qmmp/Input
+ INSTALLS += target
+ PKGCONFIG += taglib flac
+ LIBS += -lqmmp
+ QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libflac.so
+}
+
+win32 {
+ HEADERS += ../../../../src/qmmp/metadatamodel.h \
+ ../../../../src/qmmp/decoderfactory.h
+ QMAKE_LIBDIR += ../../../../bin
+ LIBS += -lqmmp0 -lflac -logg -ltag.dll -lm
+}
diff --git a/src/plugins/Input/flac/flacmetadatamodel.cpp b/src/plugins/Input/flac/flacmetadatamodel.cpp
index 48cd4bc9e..eb89e4724 100644
--- a/src/plugins/Input/flac/flacmetadatamodel.cpp
+++ b/src/plugins/Input/flac/flacmetadatamodel.cpp
@@ -62,13 +62,13 @@ QHash<QString, QString> FLACMetaDataModel::audioProperties()
qint64 size = 0;
if(m_path.endsWith(".flac"))
{
- flacFile = new TagLib::FLAC::File(m_path.toLocal8Bit ());
+ flacFile = new TagLib::FLAC::File(m_path.toLocal8Bit().constData());
taglib_ap = flacFile->audioProperties();
size = flacFile->length();
}
else if(m_path.endsWith(".oga"))
{
- oggFlacFile = new TagLib::Ogg::FLAC::File(m_path.toLocal8Bit ());
+ oggFlacFile = new TagLib::Ogg::FLAC::File(m_path.toLocal8Bit().constData());
taglib_ap = oggFlacFile->audioProperties();
size = oggFlacFile->length();
}