Mercurial > hg > svcore
changeset 799:c808c57e5560 qt5 sonic-annotator-1.0
Merge from the default branch
author | Chris Cannam |
---|---|
date | Wed, 08 May 2013 09:37:21 +0100 |
parents | c1fcfdf43a01 (diff) fea591a66e5d (current diff) |
children | 9207c142b461 a2eb9de7302e |
files | configure configure.ac |
diffstat | 12 files changed, 441 insertions(+), 677 deletions(-) [+] |
line wrap: on
line diff
--- a/acinclude.m4 Wed May 08 09:36:49 2013 +0100 +++ b/acinclude.m4 Wed May 08 09:37:21 2013 +0100 @@ -66,7 +66,7 @@ AC_REQUIRE([AC_PROG_CXX]) if test x$QMAKE = x ; then - AC_CHECK_PROG(QMAKE, qmake-qt4, $QTDIR/bin/qmake-qt4,,$QTDIR/bin/) + AC_CHECK_PROG(QMAKE, qmake-qt5, $QTDIR/bin/qmake-qt5,,$QTDIR/bin/) fi if test x$QMAKE = x ; then AC_CHECK_PROG(QMAKE, qmake, $QTDIR/bin/qmake,,$QTDIR/bin/) @@ -75,16 +75,16 @@ AC_CHECK_PROG(QMAKE, qmake.exe, $QTDIR/bin/qmake.exe,,$QTDIR/bin/) fi if test x$QMAKE = x ; then - AC_CHECK_PROG(QMAKE, qmake-qt4, qmake-qt4,,$PATH) + AC_CHECK_PROG(QMAKE, qmake-qt5, qmake-qt5,,$PATH) fi if test x$QMAKE = x ; then AC_CHECK_PROG(QMAKE, qmake, qmake,,$PATH) fi if test x$QMAKE = x ; then AC_MSG_ERROR([ -Failed to find the required qmake-qt4 or qmake program. Please -ensure you have the necessary Qt4 development files installed, and -if necessary set QTDIR to the location of your Qt4 installation. +Failed to find the required qmake-qt5 or qmake program. Please +ensure you have the necessary Qt5 development files installed, and +if necessary set QTDIR to the location of your Qt5 installation. ]) fi @@ -98,11 +98,11 @@ # QMAKE_VERSION_OUTPUT=`$QMAKE -v` case "$QMAKE_VERSION_OUTPUT" in - *2.*4.*) ;; + *5.*) ;; *) AC_MSG_WARN([ *** The version of qmake found in "$QMAKE" looks like it might be - from the wrong version of Qt (Qt4 is required). Please check - that this is the correct version of qmake for Qt4 builds. + from the wrong version of Qt (Qt5 is required). Please check + that this is the correct version of qmake for Qt5 builds. ]) esac
--- a/config.pri.in Wed May 08 09:36:49 2013 +0100 +++ b/config.pri.in Wed May 08 09:37:21 2013 +0100 @@ -1,17 +1,19 @@ CONFIG += @QMAKE_CONFIG@ -DEFINES += @HAVES@ +DEFINES += @HAVES@ HAVE_DATAQUAY QMAKE_CC = @CC@ QMAKE_CXX = @CXX@ QMAKE_LINK = @CXX@ QMAKE_CFLAGS += @CFLAGS@ -QMAKE_CXXFLAGS += @CXXFLAGS@ +QMAKE_CXXFLAGS += @CXXFLAGS@ +QMAKE_LFLAGS += @LDFLAGS@ linux*:LIBS += -lasound -macx*:DEFINES += HAVE_COREAUDIO +macx*:DEFINES += HAVE_COREAUDIO MACOSX_DEPLOYMENT_TARGET=1060 + macx*:LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices LIBS += @LIBS@
--- a/configure Wed May 08 09:36:49 2013 +0100 +++ b/configure Wed May 08 09:37:21 2013 +0100 @@ -650,8 +650,6 @@ portaudio_2_0_CFLAGS liblo_LIBS liblo_CFLAGS -dataquay_LIBS -dataquay_CFLAGS rubberband_LIBS rubberband_CFLAGS vamphostsdk_LIBS @@ -763,8 +761,6 @@ vamphostsdk_LIBS rubberband_CFLAGS rubberband_LIBS -dataquay_CFLAGS -dataquay_LIBS liblo_CFLAGS liblo_LIBS portaudio_2_0_CFLAGS @@ -1436,10 +1432,6 @@ C compiler flags for rubberband, overriding pkg-config rubberband_LIBS linker flags for rubberband, overriding pkg-config - dataquay_CFLAGS - C compiler flags for dataquay, overriding pkg-config - dataquay_LIBS - linker flags for dataquay, overriding pkg-config liblo_CFLAGS C compiler flags for liblo, overriding pkg-config liblo_LIBS linker flags for liblo, overriding pkg-config @@ -3965,8 +3957,8 @@ if test x$QMAKE = x ; then - # Extract the first word of "qmake-qt4", so it can be a program name with args. -set dummy qmake-qt4; ac_word=$2 + # Extract the first word of "qmake-qt5", so it can be a program name with args. +set dummy qmake-qt5; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_QMAKE+:} false; then : @@ -3982,7 +3974,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_QMAKE="$QTDIR/bin/qmake-qt4" + ac_cv_prog_QMAKE="$QTDIR/bin/qmake-qt5" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4082,8 +4074,8 @@ fi if test x$QMAKE = x ; then - # Extract the first word of "qmake-qt4", so it can be a program name with args. -set dummy qmake-qt4; ac_word=$2 + # Extract the first word of "qmake-qt5", so it can be a program name with args. +set dummy qmake-qt5; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_QMAKE+:} false; then : @@ -4099,7 +4091,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_QMAKE="qmake-qt4" + ac_cv_prog_QMAKE="qmake-qt5" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4161,9 +4153,9 @@ fi if test x$QMAKE = x ; then as_fn_error $? " -Failed to find the required qmake-qt4 or qmake program. Please -ensure you have the necessary Qt4 development files installed, and -if necessary set QTDIR to the location of your Qt4 installation. +Failed to find the required qmake-qt5 or qmake program. Please +ensure you have the necessary Qt5 development files installed, and +if necessary set QTDIR to the location of your Qt5 installation. " "$LINENO" 5 fi @@ -4177,16 +4169,16 @@ # QMAKE_VERSION_OUTPUT=`$QMAKE -v` case "$QMAKE_VERSION_OUTPUT" in - *2.*4.*) ;; + *5.*) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** The version of qmake found in \"$QMAKE\" looks like it might be - from the wrong version of Qt (Qt4 is required). Please check - that this is the correct version of qmake for Qt4 builds. + from the wrong version of Qt (Qt5 is required). Please check + that this is the correct version of qmake for Qt5 builds. " >&5 $as_echo "$as_me: WARNING: *** The version of qmake found in \"$QMAKE\" looks like it might be - from the wrong version of Qt (Qt4 is required). Please check - that this is the correct version of qmake for Qt4 builds. + from the wrong version of Qt (Qt5 is required). Please check + that this is the correct version of qmake for Qt5 builds. " >&2;} esac @@ -5467,157 +5459,6 @@ fi -SV_MODULE_MODULE=dataquay -SV_MODULE_VERSION_TEST="dataquay >= 0.9" -SV_MODULE_HEADER=dataquay/Uri.h -SV_MODULE_LIB=dataquay -SV_MODULE_FUNC=dataquay_v_0_9_present -SV_MODULE_HAVE=HAVE_$(echo dataquay | tr 'a-z' 'A-Z') -SV_MODULE_FAILED=1 -if test -n "$dataquay_LIBS" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&5 -$as_echo "$as_me: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&6;} - CXXFLAGS="$CXXFLAGS $dataquay_CFLAGS" - LIBS="$LIBS $dataquay_LIBS" - SV_MODULE_FAILED="" -fi -if test -z "$SV_MODULE_VERSION_TEST" ; then - SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE -fi -if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dataquay" >&5 -$as_echo_n "checking for dataquay... " >&6; } - -if test -n "$dataquay_CFLAGS"; then - pkg_cv_dataquay_CFLAGS="$dataquay_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dataquay_CFLAGS=`$PKG_CONFIG --cflags "$SV_MODULE_VERSION_TEST" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dataquay_LIBS"; then - pkg_cv_dataquay_LIBS="$dataquay_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dataquay_LIBS=`$PKG_CONFIG --libs "$SV_MODULE_VERSION_TEST" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dataquay_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1` - else - dataquay_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dataquay_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5 -$as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;} -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5 -$as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;} -else - dataquay_CFLAGS=$pkg_cv_dataquay_CFLAGS - dataquay_LIBS=$pkg_cv_dataquay_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $dataquay_CFLAGS";LIBS="$LIBS $dataquay_LIBS";SV_MODULE_FAILED="" -fi -fi -if test -n "$SV_MODULE_FAILED"; then - as_ac_Header=`$as_echo "ac_cv_header_$SV_MODULE_HEADER" | $as_tr_sh` -ac_fn_cxx_check_header_mongrel "$LINENO" "$SV_MODULE_HEADER" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - HAVES="$HAVES $SV_MODULE_HAVE" -else - as_fn_error $? "Failed to find header $SV_MODULE_HEADER for required module $SV_MODULE_MODULE" "$LINENO" 5 -fi - - - if test -n "$SV_MODULE_LIB"; then - as_ac_Lib=`$as_echo "ac_cv_lib_$SV_MODULE_LIB''_$SV_MODULE_FUNC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB" >&5 -$as_echo_n "checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$SV_MODULE_LIB $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $SV_MODULE_FUNC (); -int -main () -{ -return $SV_MODULE_FUNC (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - LIBS="$LIBS -l$SV_MODULE_LIB" -else - as_fn_error $? "Failed to find library $SV_MODULE_LIB for required module $SV_MODULE_MODULE" "$LINENO" 5 -fi - - fi -fi - - SV_MODULE_MODULE=liblo SV_MODULE_VERSION_TEST=""
--- a/configure.ac Wed May 08 09:36:49 2013 +0100 +++ b/configure.ac Wed May 08 09:37:21 2013 +0100 @@ -82,7 +82,6 @@ SV_MODULE_REQUIRED([vamp],[vamp >= 2.1],[vamp/vamp.h],[],[]) SV_MODULE_REQUIRED([vamphostsdk],[vamp-hostsdk >= 2.5],[vamp-hostsdk/PluginLoader.h],[vamp-hostsdk],[libvamphostsdk_v_2_5_present]) SV_MODULE_REQUIRED([rubberband],[rubberband],[rubberband/RubberBandStretcher.h],[rubberband],[rubberband_new]) -SV_MODULE_REQUIRED([dataquay],[dataquay >= 0.9],[dataquay/Uri.h],[dataquay],[dataquay_v_0_9_present]) SV_MODULE_OPTIONAL([liblo],[],[lo/lo.h],[lo],[lo_address_new]) SV_MODULE_OPTIONAL([portaudio_2_0],[portaudio-2.0 >= 19],[portaudio.h],[portaudio],[Pa_IsFormatSupported])
--- a/data/fileio/CoreAudioFileReader.cpp Wed May 08 09:36:49 2013 +0100 +++ b/data/fileio/CoreAudioFileReader.cpp Wed May 08 09:37:21 2013 +0100 @@ -52,7 +52,7 @@ text[2] = (uerr >> 8) & 0xff; text[3] = (uerr) & 0xff; text[4] = '\0'; - return QString("%1 (%2)").arg(err).arg(QString::fromAscii(text)); + return QString("%1 (%2)").arg(err).arg(QString::fromLocal8Bit(text)); } CoreAudioFileReader::CoreAudioFileReader(FileSource source,
--- a/data/fileio/FileSource.cpp Wed May 08 09:36:49 2013 +0100 +++ b/data/fileio/FileSource.cpp Wed May 08 09:37:21 2013 +0100 @@ -20,12 +20,11 @@ #include "base/ProgressReporter.h" #include "system/System.h" -#include <QHttp> -#include <QFtp> +#include <QNetworkAccessManager> +#include <QNetworkReply> #include <QFileInfo> #include <QDir> #include <QCoreApplication> -#include <QHttpResponseHeader> #include <iostream> #include <cstdlib> @@ -68,12 +67,13 @@ } #endif +static QNetworkAccessManager nm; + FileSource::FileSource(QString fileOrUrl, ProgressReporter *reporter, QString preferredContentType) : m_url(fileOrUrl, QUrl::StrictMode), - m_ftp(0), - m_http(0), m_localFile(0), + m_reply(0), m_preferredContentType(preferredContentType), m_ok(false), m_lastStatus(0), @@ -98,7 +98,7 @@ #endif if (!canHandleScheme(m_url)) { - SVDEBUG << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -110,7 +110,7 @@ #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource::FileSource: Failed to open local file with URL \"" << m_url.toString() << "\"; trying again assuming filename was encoded" << std::endl; #endif - m_url = QUrl::fromEncoded(fileOrUrl.toAscii()); + m_url = QUrl::fromEncoded(fileOrUrl.toLatin1()); init(); } @@ -138,7 +138,7 @@ // already done all the work and no request will be sent deleteCacheFile(); - m_url.setEncodedUrl(fileOrUrl.toAscii()); + m_url = QUrl::fromEncoded(fileOrUrl.toLatin1()); m_ok = false; m_done = false; @@ -153,15 +153,14 @@ } #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(string) exiting" << endl; + std::cerr << "FileSource::FileSource(string) exiting" << std::endl; #endif } FileSource::FileSource(QUrl url, ProgressReporter *reporter) : m_url(url), - m_ftp(0), - m_http(0), m_localFile(0), + m_reply(0), m_ok(false), m_lastStatus(0), m_resource(false), @@ -172,12 +171,12 @@ m_refCounted(false) { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(" << url.toString() << ") [as url]" << endl; + std::cerr << "FileSource::FileSource(" << url.toString() << ") [as url]" << std::endl; incCount(m_url.toString()); #endif if (!canHandleScheme(m_url)) { - SVDEBUG << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -185,16 +184,15 @@ init(); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(url) exiting" << endl; + std::cerr << "FileSource::FileSource(url) exiting" << std::endl; #endif } FileSource::FileSource(const FileSource &rf) : QObject(), m_url(rf.m_url), - m_ftp(0), - m_http(0), m_localFile(0), + m_reply(0), m_ok(rf.m_ok), m_lastStatus(rf.m_lastStatus), m_resource(rf.m_resource), @@ -205,12 +203,12 @@ m_refCounted(false) { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]" << endl; + std::cerr << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]" << std::endl; incCount(m_url.toString()); #endif if (!canHandleScheme(m_url)) { - SVDEBUG << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << endl; + std::cerr << "FileSource::FileSource: ERROR: Unsupported scheme in URL \"" << m_url.toString() << "\"" << std::endl; m_errorString = tr("Unsupported scheme in URL"); return; } @@ -220,8 +218,8 @@ } else { QMutexLocker locker(&m_mapMutex); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(copy ctor): ref count is " - << m_refCountMap[m_url] << endl; + std::cerr << "FileSource::FileSource(copy ctor): ref count is " + << m_refCountMap[m_url] << std::endl; #endif if (m_refCountMap[m_url] > 0) { m_refCountMap[m_url]++; @@ -239,11 +237,11 @@ m_done = true; #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]: note: local filename is \"" << m_localFilename << "\"" << endl; + std::cerr << "FileSource::FileSource(" << m_url.toString() << ") [copy ctor]: note: local filename is \"" << m_localFilename << "\"" << std::endl; #endif #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::FileSource(copy ctor) exiting" << endl; + std::cerr << "FileSource::FileSource(copy ctor) exiting" << std::endl; #endif } @@ -380,13 +378,11 @@ << m_url.toString() << "\", retrieving" << std::endl; #endif - if (scheme == "http") { - initHttp(); + if (scheme == "http" || scheme == "https" || scheme == "ftp") { + initRemote(); #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource: initHttp succeeded" << std::endl; + std::cerr << "FileSource: initRemote returned" << std::endl; #endif - } else if (scheme == "ftp") { - initFtp(); } else { m_remote = false; m_ok = false; @@ -430,110 +426,35 @@ } void -FileSource::initHttp() +FileSource::initRemote() { m_ok = true; - int port = m_url.port(); - m_http = new QHttp(m_url.host(), port < 0 ? 80 : port); - connect(m_http, SIGNAL(done(bool)), this, SLOT(done(bool))); - connect(m_http, SIGNAL(dataReadProgress(int, int)), - this, SLOT(dataReadProgress(int, int))); - connect(m_http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - this, SLOT(httpResponseHeaderReceived(const QHttpResponseHeader &))); - // I don't quite understand this. url.path() returns a path - // without percent encoding; for example, spaces appear as - // literal spaces. This generally won't work if sent to the - // server directly. You can retrieve a correctly encoded URL - // from QUrl using url.toEncoded(), but that gives you the - // whole URL; there doesn't seem to be any way to retrieve - // only an encoded path. Furthermore there doesn't seem to be - // any way to convert a retrieved path into an encoded path - // without explicitly specifying that you don't want the path - // separators ("/") to be encoded. (Besides being painful to - // manage, I don't see how this can work correctly in any case - // where a percent-encoded "/" is supposed to appear within a - // path element?) There also seems to be no way to retrieve - // the path plus query string, i.e. everything that I need to - // send to the HTTP server. And no way for QHttp to take a - // QUrl argument. I'm obviously missing something. - - // So, two ways to do this: query the bits from the URL, - // encode them individually, and glue them back together - // again... -/* - QString path = QUrl::toPercentEncoding(m_url.path(), "/"); - QList<QPair<QString, QString> > query = m_url.queryItems(); - if (!query.empty()) { - QStringList q2; - for (QList<QPair<QString, QString> >::iterator i = query.begin(); - i != query.end(); ++i) { - q2.push_back(QString("%1=%3") - .arg(QString(QUrl::toPercentEncoding(i->first))) - .arg(QString(QUrl::toPercentEncoding(i->second)))); - } - path = QString("%1%2%3") - .arg(path).arg("?") - .arg(q2.join("&")); - } -*/ - - // ...or, much simpler but relying on knowledge about the - // scheme://host/path/path/query etc format of the URL, we can - // get the whole URL ready-encoded and then split it on "/" as - // appropriate... - - QString path = "/" + QString(m_url.toEncoded()).section('/', 3); - -#ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource: path is \"" - << path << "\"" << endl; -#endif - - if (m_preferredContentType == "") { - m_http->get(path, m_localFile); - } else { + QNetworkRequest req; + req.setUrl(m_url); + + if (m_preferredContentType != "") { #ifdef DEBUG_FILE_SOURCE std::cerr << "FileSource: indicating preferred content type of \"" << m_preferredContentType << "\"" << std::endl; #endif - QHttpRequestHeader header("GET", path); - header.setValue("Host", m_url.host()); - header.setValue("Accept", QString("%1, */*").arg(m_preferredContentType)); - m_http->request(header, 0, m_localFile); + req.setRawHeader + ("Accept", + QString("%1, */*").arg(m_preferredContentType).toLatin1()); } -} -void -FileSource::initFtp() -{ - m_ok = true; - m_ftp = new QFtp; - connect(m_ftp, SIGNAL(done(bool)), this, SLOT(done(bool))); - connect(m_ftp, SIGNAL(commandFinished(int, bool)), - this, SLOT(ftpCommandFinished(int, bool))); - connect(m_ftp, SIGNAL(dataTransferProgress(qint64, qint64)), - this, SLOT(dataTransferProgress(qint64, qint64))); - m_ftp->connectToHost(m_url.host(), m_url.port(21)); - - QString username = m_url.userName(); - if (username == "") { - username = "anonymous"; - } - - QString password = m_url.password(); - if (password == "") { - password = QString("%1@%2").arg(getenv("USER")).arg(getenv("HOST")); - } - - m_ftp->login(username, password); - - QString dirpath = m_url.path().section('/', 0, -2); - QString filename = m_url.path().section('/', -1); - - if (dirpath == "") dirpath = "/"; - m_ftp->cd(dirpath); - m_ftp->get(filename, m_localFile); + m_reply = nm.get(req); + + connect(m_reply, SIGNAL(readyRead()), + this, SLOT(readyRead())); + connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), + this, SLOT(replyFailed(QNetworkReply::NetworkError))); + connect(m_reply, SIGNAL(finished()), + this, SLOT(replyFinished())); + connect(m_reply, SIGNAL(metaDataChanged()), + this, SLOT(metaDataChanged())); + connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), + this, SLOT(downloadProgress(qint64, qint64))); } void @@ -544,17 +465,11 @@ m_localFile = 0; } m_done = true; - if (m_http) { - QHttp *h = m_http; - m_http = 0; - h->abort(); - h->deleteLater(); - } - if (m_ftp) { - QFtp *f = m_ftp; - m_ftp = 0; - f->abort(); - f->deleteLater(); + if (m_reply) { + QNetworkReply *r = m_reply; + m_reply = 0; + r->abort(); + r->deleteLater(); } if (m_localFile) { delete m_localFile; // does not actually delete the file @@ -576,8 +491,8 @@ { // Note that a "scheme" with length 1 is probably a DOS drive letter QString scheme = url.scheme().toLower(); - return (scheme == "http" || scheme == "ftp" || - scheme == "file" || scheme == "qrc" || + return (scheme == "http" || scheme == "https" || + scheme == "ftp" || scheme == "file" || scheme == "qrc" || scheme == "" || scheme.length() == 1); } @@ -589,8 +504,8 @@ if (!m_ok) available = false; else available = (m_lastStatus / 100 == 2); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::isAvailable: " << (available ? "yes" : "no") - << endl; + std::cerr << "FileSource::isAvailable: " << (available ? "yes" : "no") + << std::endl; #endif return available; } @@ -608,7 +523,7 @@ FileSource::waitForData() { while (m_ok && !m_done) { -// SVDEBUG << "FileSource::waitForData: calling QApplication::processEvents" << endl; +// std::cerr << "FileSource::waitForData: calling QApplication::processEvents" << std::endl; QCoreApplication::processEvents(); usleep(10000); } @@ -685,23 +600,32 @@ } void -FileSource::dataReadProgress(int done, int total) +FileSource::readyRead() { - dataTransferProgress(done, total); + m_localFile->write(m_reply->readAll()); } void -FileSource::httpResponseHeaderReceived(const QHttpResponseHeader &resp) +FileSource::metaDataChanged() { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::httpResponseHeaderReceived" << endl; + std::cerr << "FileSource::metaDataChanged" << std::endl; #endif - if (resp.statusCode() / 100 == 3) { - QString location = resp.value("Location"); + if (!m_reply) { + std::cerr << "WARNING: FileSource::metaDataChanged() called without a reply object being known to us" << std::endl; + return; + } + + int status = + m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + + if (status / 100 == 3) { + QString location = m_reply->header + (QNetworkRequest::LocationHeader).toString(); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::responseHeaderReceived: redirect to \"" - << location << "\" received" << endl; + std::cerr << "FileSource::metaDataChanged: redirect to \"" + << location << "\" received" << std::endl; #endif if (location != "") { QUrl newUrl(location); @@ -723,58 +647,29 @@ } } - m_lastStatus = resp.statusCode(); + m_lastStatus = status; if (m_lastStatus / 100 >= 4) { m_errorString = QString("%1 %2") - .arg(resp.statusCode()).arg(resp.reasonPhrase()); + .arg(status) + .arg(m_reply->attribute + (QNetworkRequest::HttpReasonPhraseAttribute).toString()); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::responseHeaderReceived: " - << m_errorString << endl; + std::cerr << "FileSource::metaDataChanged: " + << m_errorString << std::endl; #endif } else { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::responseHeaderReceived: " - << m_lastStatus << endl; + std::cerr << "FileSource::metaDataChanged: " + << m_lastStatus << std::endl; #endif - if (resp.hasContentType()) m_contentType = resp.contentType(); + m_contentType = + m_reply->header(QNetworkRequest::ContentTypeHeader).toString(); } emit statusAvailable(); } void -FileSource::ftpCommandFinished(int id, bool error) -{ -#ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::ftpCommandFinished(" << id << ", " << error << ")" << std::endl; -#endif - - if (!m_ftp) return; - - QFtp::Command command = m_ftp->currentCommand(); - - if (!error) { -#ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::ftpCommandFinished: success for command " - << command << endl; -#endif - return; - } - - if (command == QFtp::ConnectToHost) { - m_errorString = tr("Failed to connect to FTP server"); - } else if (command == QFtp::Login) { - m_errorString = tr("Login failed"); - } else if (command == QFtp::Cd) { - m_errorString = tr("Failed to change to correct directory"); - } else if (command == QFtp::Get) { - m_errorString = tr("FTP download aborted"); - } - - m_lastStatus = 400; // for done() -} - -void -FileSource::dataTransferProgress(qint64 done, qint64 total) +FileSource::downloadProgress(qint64 done, qint64 total) { int percent = int((double(done) / double(total)) * 100.0 - 0.1); emit progress(percent); @@ -791,27 +686,17 @@ } void -FileSource::done(bool error) +FileSource::replyFinished() { emit progress(100); #ifdef DEBUG_FILE_SOURCE - std::cerr << "FileSource::done(" << error << ")" << std::endl; + std::cerr << "FileSource::replyFinished()" << std::endl; #endif if (m_done) return; - if (error) { - if (m_http) { - m_errorString = m_http->errorString(); - } else if (m_ftp) { - m_errorString = m_ftp->errorString(); - } - } - - if (m_lastStatus / 100 >= 4) { - error = true; - } + bool error = (m_lastStatus / 100 >= 4); cleanup(); @@ -840,10 +725,21 @@ } void +FileSource::replyFailed(QNetworkReply::NetworkError) +{ + emit progress(100); + m_errorString = m_reply->errorString(); + m_ok = false; + m_done = true; + cleanup(); + emit ready(); +} + +void FileSource::deleteCacheFile() { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::deleteCacheFile(\"" << m_localFilename << "\")" << endl; + std::cerr << "FileSource::deleteCacheFile(\"" << m_localFilename << "\")" << std::endl; #endif cleanup(); @@ -884,7 +780,7 @@ #endif } else { #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::deleteCacheFile: Deleted cache file \"" << m_localFilename << "\"" << endl; + std::cerr << "FileSource::deleteCacheFile: Deleted cache file \"" << m_localFilename << "\"" << std::endl; #endif m_localFilename = ""; } @@ -901,7 +797,7 @@ QMutexLocker locker(&m_mapMutex); #ifdef DEBUG_FILE_SOURCE - SVDEBUG << "FileSource::createCacheFile: refcount is " << m_refCountMap[m_url] << endl; + std::cerr << "FileSource::createCacheFile: refcount is " << m_refCountMap[m_url] << std::endl; #endif if (m_refCountMap[m_url] > 0) {
--- a/data/fileio/FileSource.h Wed May 08 09:36:49 2013 +0100 +++ b/data/fileio/FileSource.h Wed May 08 09:37:21 2013 +0100 @@ -20,15 +20,13 @@ #include <QMutex> #include <QString> #include <QTimer> +#include <QNetworkReply> #include <map> #include "base/Debug.h" -class QFtp; -class QHttp; class QFile; -class QHttpResponseHeader; class ProgressReporter; /** @@ -210,20 +208,19 @@ void ready(); protected slots: - void dataReadProgress(int done, int total); - void httpResponseHeaderReceived(const QHttpResponseHeader &resp); - void ftpCommandFinished(int, bool); - void dataTransferProgress(qint64 done, qint64 total); - void done(bool error); + void metaDataChanged(); + void readyRead(); + void replyFailed(QNetworkReply::NetworkError); + void replyFinished(); + void downloadProgress(qint64 done, qint64 total); void cancelled(); protected: FileSource &operator=(const FileSource &); // not provided QUrl m_url; - QFtp *m_ftp; - QHttp *m_http; QFile *m_localFile; + QNetworkReply *m_reply; QString m_localFilename; QString m_errorString; QString m_contentType; @@ -244,8 +241,7 @@ bool m_refCounted; void init(); - void initHttp(); - void initFtp(); + void initRemote(); void cleanup();
--- a/data/fileio/test/AudioFileReaderTest.h Wed May 08 09:36:49 2013 +0100 +++ b/data/fileio/test/AudioFileReaderTest.h Wed May 08 09:37:21 2013 +0100 @@ -78,7 +78,7 @@ if (bits.length() > 2) nominalDepth = bits[2].toInt(); if (!reader) { - QSKIP("Unsupported file, skipping", SkipSingle); + QSKIP("Unsupported file, skipping"); } QCOMPARE((int)reader->getChannelCount(), nominalChannels);
--- a/data/fileio/test/test.pro Wed May 08 09:36:49 2013 +0100 +++ b/data/fileio/test/test.pro Wed May 08 09:37:21 2013 +0100 @@ -1,9 +1,23 @@ TEMPLATE = app -LIBS += -L../../.. -lsvcore +LIBS += -L../../.. -L../../../debug -L../../../../dataquay -lsvcore -ldataquay -include(../../../config.pri) +win32-g++ { + INCLUDEPATH += ../../../../sv-dependency-builds/win32-mingw/include + LIBS += -L../../../../sv-dependency-builds/win32-mingw/lib +} + +exists(../../../config.pri) { + include(../../../config.pri) +} + +win* { + !exists(../../../config.pri) { + DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_RUBBERBAND HAVE_DATAQUAY HAVE_LIBLO HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO_2_0 + LIBS += -lbz2 -lrubberband -lvamp-hostsdk -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -llo -lz -lsord-0 -lserd-0 -lwinmm -lws2_32 + } +} CONFIG += qt thread warn_on stl rtti exceptions console QT += network xml testlib @@ -21,7 +35,7 @@ SOURCES += main.cpp win* { -PRE_TARGETDEPS += ../../../svcore.lib +//PRE_TARGETDEPS += ../../../svcore.lib } !win* { PRE_TARGETDEPS += ../../../libsvcore.a
--- a/data/model/ModelDataTableModel.cpp Wed May 08 09:36:49 2013 +0100 +++ b/data/model/ModelDataTableModel.cpp Wed May 08 09:37:21 2013 +0100 @@ -129,7 +129,7 @@ QModelIndex ModelDataTableModel::index(int row, int column, const QModelIndex &parent) const { - return createIndex(row, column, 0); + return createIndex(row, column, (void *)0); } QModelIndex @@ -159,7 +159,7 @@ { if (!m_model) return createIndex(0, 0); int row = m_model->getRowForFrame(frame); - return createIndex(getSorted(row), 0, 0); + return createIndex(getSorted(row), 0, (void *)0); } size_t @@ -206,7 +206,7 @@ int current = getCurrentRow(); if (current != prevCurrent) { // std::cerr << "Current row changed from " << prevCurrent << " to " << current << " for underlying row " << m_currentRow << std::endl; - emit currentChanged(createIndex(current, 0, 0)); + emit currentChanged(createIndex(current, 0, (void *)0)); } emit layoutChanged(); }
--- a/data/model/RangeSummarisableTimeValueModel.h Wed May 08 09:36:49 2013 +0100 +++ b/data/model/RangeSummarisableTimeValueModel.h Wed May 08 09:37:21 2013 +0100 @@ -21,6 +21,8 @@ #include "DenseTimeValueModel.h" #include "base/ZoomConstraint.h" +#include <stdint.h> + /** * Base class for models containing dense two-dimensional data (value * against time) that may be meaningfully represented in a zoomed view
--- a/svcore.pro Wed May 08 09:36:49 2013 +0100 +++ b/svcore.pro Wed May 08 09:37:21 2013 +0100 @@ -1,270 +1,284 @@ - -TEMPLATE = lib - -include(config.pri) - -CONFIG += staticlib qt thread warn_on stl rtti exceptions -QT += network xml -QT -= gui - -TARGET = svcore - -DEPENDPATH += . data plugin plugin/api/alsa -INCLUDEPATH += . data plugin plugin/api/alsa -OBJECTS_DIR = o -MOC_DIR = o - -# Doesn't work with this library, which contains C99 as well as C++ -PRECOMPILED_HEADER = - -# Set up suitable platform defines for RtMidi -linux*: DEFINES += __LINUX_ALSASEQ__ -macx*: DEFINES += __MACOSX_CORE__ -win*: DEFINES += __WINDOWS_MM__ -solaris*: DEFINES += __RTMIDI_DUMMY_ONLY__ - -HEADERS += base/AudioLevel.h \ - base/AudioPlaySource.h \ - base/Clipboard.h \ - base/Command.h \ - base/Debug.h \ - base/Exceptions.h \ - base/LogRange.h \ - base/Pitch.h \ - base/Playable.h \ - base/PlayParameterRepository.h \ - base/PlayParameters.h \ - base/Preferences.h \ - base/Profiler.h \ - base/ProgressPrinter.h \ - base/ProgressReporter.h \ - base/PropertyContainer.h \ - base/RangeMapper.h \ - base/RealTime.h \ - base/RecentFiles.h \ - base/Resampler.h \ - base/ResizeableBitset.h \ - base/ResourceFinder.h \ - base/RingBuffer.h \ - base/Scavenger.h \ - base/Selection.h \ - base/Serialiser.h \ - base/StorageAdviser.h \ - base/StringBits.h \ - base/TempDirectory.h \ - base/TempWriteFile.h \ - base/TextMatcher.h \ - base/Thread.h \ - base/UnitDatabase.h \ - base/ViewManagerBase.h \ - base/Window.h \ - base/XmlExportable.h \ - base/ZoomConstraint.h -SOURCES += base/AudioLevel.cpp \ - base/Clipboard.cpp \ - base/Command.cpp \ - base/Debug.cpp \ - base/Exceptions.cpp \ - base/LogRange.cpp \ - base/Pitch.cpp \ - base/PlayParameterRepository.cpp \ - base/PlayParameters.cpp \ - base/Preferences.cpp \ - base/Profiler.cpp \ - base/ProgressPrinter.cpp \ - base/ProgressReporter.cpp \ - base/PropertyContainer.cpp \ - base/RangeMapper.cpp \ - base/RealTime.cpp \ - base/RecentFiles.cpp \ - base/Resampler.cpp \ - base/ResourceFinder.cpp \ - base/Selection.cpp \ - base/Serialiser.cpp \ - base/StorageAdviser.cpp \ - base/StringBits.cpp \ - base/TempDirectory.cpp \ - base/TempWriteFile.cpp \ - base/TextMatcher.cpp \ - base/Thread.cpp \ - base/UnitDatabase.cpp \ - base/ViewManagerBase.cpp \ - base/XmlExportable.cpp - -HEADERS += data/fft/FFTapi.h \ - data/fft/FFTCacheReader.h \ - data/fft/FFTCacheStorageType.h \ - data/fft/FFTCacheWriter.h \ - data/fft/FFTDataServer.h \ - data/fft/FFTFileCacheReader.h \ - data/fft/FFTFileCacheWriter.h \ - data/fft/FFTMemoryCache.h \ - data/fileio/AudioFileReader.h \ - data/fileio/AudioFileReaderFactory.h \ - data/fileio/BZipFileDevice.h \ - data/fileio/CachedFile.h \ - data/fileio/CodedAudioFileReader.h \ - data/fileio/CSVFileReader.h \ - data/fileio/CSVFileWriter.h \ - data/fileio/CSVFormat.h \ - data/fileio/DataFileReader.h \ - data/fileio/DataFileReaderFactory.h \ - data/fileio/FileFinder.h \ - data/fileio/FileReadThread.h \ - data/fileio/FileSource.h \ - data/fileio/MatchFileReader.h \ - data/fileio/MatrixFile.h \ - data/fileio/MIDIFileReader.h \ - data/fileio/MIDIFileWriter.h \ - data/fileio/MP3FileReader.h \ - data/fileio/OggVorbisFileReader.h \ - data/fileio/PlaylistFileReader.h \ - data/fileio/QuickTimeFileReader.h \ - data/fileio/CoreAudioFileReader.h \ - data/fileio/ResamplingWavFileReader.h \ - data/fileio/WavFileReader.h \ - data/fileio/WavFileWriter.h \ - data/midi/MIDIEvent.h \ - data/midi/MIDIInput.h \ - data/midi/rtmidi/RtError.h \ - data/midi/rtmidi/RtMidi.h \ - data/model/AggregateWaveModel.h \ - data/model/AlignmentModel.h \ - data/model/Dense3DModelPeakCache.h \ - data/model/DenseThreeDimensionalModel.h \ - data/model/DenseTimeValueModel.h \ - data/model/EditableDenseThreeDimensionalModel.h \ - data/model/FFTModel.h \ - data/model/ImageModel.h \ - data/model/IntervalModel.h \ - data/model/Labeller.h \ - data/model/Model.h \ - data/model/ModelDataTableModel.h \ - data/model/NoteModel.h \ - data/model/PathModel.h \ - data/model/PowerOfSqrtTwoZoomConstraint.h \ - data/model/PowerOfTwoZoomConstraint.h \ - data/model/RangeSummarisableTimeValueModel.h \ - data/model/RegionModel.h \ - data/model/SparseModel.h \ - data/model/SparseOneDimensionalModel.h \ - data/model/SparseTimeValueModel.h \ - data/model/SparseValueModel.h \ - data/model/TabularModel.h \ - data/model/TextModel.h \ - data/model/WaveFileModel.h \ - data/model/WritableWaveFileModel.h \ - data/osc/OSCMessage.h \ - data/osc/OSCQueue.h -SOURCES += data/fft/FFTapi.cpp \ - data/fft/FFTDataServer.cpp \ - data/fft/FFTFileCacheReader.cpp \ - data/fft/FFTFileCacheWriter.cpp \ - data/fft/FFTMemoryCache.cpp \ - data/fileio/AudioFileReader.cpp \ - data/fileio/AudioFileReaderFactory.cpp \ - data/fileio/BZipFileDevice.cpp \ - data/fileio/CachedFile.cpp \ - data/fileio/CodedAudioFileReader.cpp \ - data/fileio/CSVFileReader.cpp \ - data/fileio/CSVFileWriter.cpp \ - data/fileio/CSVFormat.cpp \ - data/fileio/DataFileReaderFactory.cpp \ - data/fileio/FileReadThread.cpp \ - data/fileio/FileSource.cpp \ - data/fileio/MatchFileReader.cpp \ - data/fileio/MatrixFile.cpp \ - data/fileio/MIDIFileReader.cpp \ - data/fileio/MIDIFileWriter.cpp \ - data/fileio/MP3FileReader.cpp \ - data/fileio/OggVorbisFileReader.cpp \ - data/fileio/PlaylistFileReader.cpp \ - data/fileio/QuickTimeFileReader.cpp \ - data/fileio/CoreAudioFileReader.cpp \ - data/fileio/ResamplingWavFileReader.cpp \ - data/fileio/WavFileReader.cpp \ - data/fileio/WavFileWriter.cpp \ - data/midi/MIDIInput.cpp \ - data/midi/rtmidi/RtMidi.cpp \ - data/model/AggregateWaveModel.cpp \ - data/model/AlignmentModel.cpp \ - data/model/Dense3DModelPeakCache.cpp \ - data/model/DenseTimeValueModel.cpp \ - data/model/EditableDenseThreeDimensionalModel.cpp \ - data/model/FFTModel.cpp \ - data/model/Model.cpp \ - data/model/ModelDataTableModel.cpp \ - data/model/PowerOfSqrtTwoZoomConstraint.cpp \ - data/model/PowerOfTwoZoomConstraint.cpp \ - data/model/RangeSummarisableTimeValueModel.cpp \ - data/model/WaveFileModel.cpp \ - data/model/WritableWaveFileModel.cpp \ - data/osc/OSCMessage.cpp \ - data/osc/OSCQueue.cpp - -HEADERS += plugin/DSSIPluginFactory.h \ - plugin/DSSIPluginInstance.h \ - plugin/FeatureExtractionPluginFactory.h \ - plugin/LADSPAPluginFactory.h \ - plugin/LADSPAPluginInstance.h \ - plugin/PluginIdentifier.h \ - plugin/PluginXml.h \ - plugin/RealTimePluginFactory.h \ - plugin/RealTimePluginInstance.h \ - plugin/api/dssi.h \ - plugin/api/ladspa.h \ - plugin/plugins/SamplePlayer.h \ - plugin/api/alsa/asoundef.h \ - plugin/api/alsa/asoundlib.h \ - plugin/api/alsa/seq.h \ - plugin/api/alsa/seq_event.h \ - plugin/api/alsa/seq_midi_event.h \ - plugin/api/alsa/sound/asequencer.h -SOURCES += plugin/DSSIPluginFactory.cpp \ - plugin/DSSIPluginInstance.cpp \ - plugin/FeatureExtractionPluginFactory.cpp \ - plugin/LADSPAPluginFactory.cpp \ - plugin/LADSPAPluginInstance.cpp \ - plugin/PluginIdentifier.cpp \ - plugin/PluginXml.cpp \ - plugin/RealTimePluginFactory.cpp \ - plugin/RealTimePluginInstance.cpp \ - plugin/api/dssi_alsa_compat.c \ - plugin/plugins/SamplePlayer.cpp - -HEADERS += rdf/PluginRDFIndexer.h \ - rdf/PluginRDFDescription.h \ - rdf/RDFExporter.h \ - rdf/RDFFeatureWriter.h \ - rdf/RDFImporter.h \ - rdf/RDFTransformFactory.h -SOURCES += rdf/PluginRDFIndexer.cpp \ - rdf/PluginRDFDescription.cpp \ - rdf/RDFExporter.cpp \ - rdf/RDFFeatureWriter.cpp \ - rdf/RDFImporter.cpp \ - rdf/RDFTransformFactory.cpp - -HEADERS += system/Init.h \ - system/System.h -SOURCES += system/Init.cpp \ - system/System.cpp - -HEADERS += transform/CSVFeatureWriter.h \ - transform/FeatureExtractionModelTransformer.h \ - transform/FeatureWriter.h \ - transform/FileFeatureWriter.h \ - transform/RealTimeEffectModelTransformer.h \ - transform/Transform.h \ - transform/TransformDescription.h \ - transform/TransformFactory.h \ - transform/ModelTransformer.h \ - transform/ModelTransformerFactory.h -SOURCES += transform/CSVFeatureWriter.cpp \ - transform/FeatureExtractionModelTransformer.cpp \ - transform/FileFeatureWriter.cpp \ - transform/RealTimeEffectModelTransformer.cpp \ - transform/Transform.cpp \ - transform/TransformFactory.cpp \ - transform/ModelTransformer.cpp \ - transform/ModelTransformerFactory.cpp + +TEMPLATE = lib + +exists(config.pri) { + include(config.pri) +} +win* { + !exists(config.pri) { + DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_RUBBERBAND HAVE_DATAQUAY HAVE_LIBLO HAVE_MAD HAVE_ID3TAG + } +} + +CONFIG += staticlib qt thread warn_on stl rtti exceptions +QT += network xml +QT -= gui + +TARGET = svcore + +DEPENDPATH += . data plugin plugin/api/alsa +INCLUDEPATH += . data plugin plugin/api/alsa ../dataquay +OBJECTS_DIR = o +MOC_DIR = o + +win32-g++ { + INCLUDEPATH += ../sv-dependency-builds/win32-mingw/include +} +win32-msvc* { + INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include +} + +# Doesn't work with this library, which contains C99 as well as C++ +PRECOMPILED_HEADER = + +# Set up suitable platform defines for RtMidi +linux*: DEFINES += __LINUX_ALSASEQ__ +macx*: DEFINES += __MACOSX_CORE__ +win*: DEFINES += __WINDOWS_MM__ +solaris*: DEFINES += __RTMIDI_DUMMY_ONLY__ + +HEADERS += base/AudioLevel.h \ + base/AudioPlaySource.h \ + base/Clipboard.h \ + base/Command.h \ + base/Debug.h \ + base/Exceptions.h \ + base/LogRange.h \ + base/Pitch.h \ + base/Playable.h \ + base/PlayParameterRepository.h \ + base/PlayParameters.h \ + base/Preferences.h \ + base/Profiler.h \ + base/ProgressPrinter.h \ + base/ProgressReporter.h \ + base/PropertyContainer.h \ + base/RangeMapper.h \ + base/RealTime.h \ + base/RecentFiles.h \ + base/Resampler.h \ + base/ResizeableBitset.h \ + base/ResourceFinder.h \ + base/RingBuffer.h \ + base/Scavenger.h \ + base/Selection.h \ + base/Serialiser.h \ + base/StorageAdviser.h \ + base/StringBits.h \ + base/TempDirectory.h \ + base/TempWriteFile.h \ + base/TextMatcher.h \ + base/Thread.h \ + base/UnitDatabase.h \ + base/ViewManagerBase.h \ + base/Window.h \ + base/XmlExportable.h \ + base/ZoomConstraint.h +SOURCES += base/AudioLevel.cpp \ + base/Clipboard.cpp \ + base/Command.cpp \ + base/Debug.cpp \ + base/Exceptions.cpp \ + base/LogRange.cpp \ + base/Pitch.cpp \ + base/PlayParameterRepository.cpp \ + base/PlayParameters.cpp \ + base/Preferences.cpp \ + base/Profiler.cpp \ + base/ProgressPrinter.cpp \ + base/ProgressReporter.cpp \ + base/PropertyContainer.cpp \ + base/RangeMapper.cpp \ + base/RealTime.cpp \ + base/RecentFiles.cpp \ + base/Resampler.cpp \ + base/ResourceFinder.cpp \ + base/Selection.cpp \ + base/Serialiser.cpp \ + base/StorageAdviser.cpp \ + base/StringBits.cpp \ + base/TempDirectory.cpp \ + base/TempWriteFile.cpp \ + base/TextMatcher.cpp \ + base/Thread.cpp \ + base/UnitDatabase.cpp \ + base/ViewManagerBase.cpp \ + base/XmlExportable.cpp + +HEADERS += data/fft/FFTapi.h \ + data/fft/FFTCacheReader.h \ + data/fft/FFTCacheStorageType.h \ + data/fft/FFTCacheWriter.h \ + data/fft/FFTDataServer.h \ + data/fft/FFTFileCacheReader.h \ + data/fft/FFTFileCacheWriter.h \ + data/fft/FFTMemoryCache.h \ + data/fileio/AudioFileReader.h \ + data/fileio/AudioFileReaderFactory.h \ + data/fileio/BZipFileDevice.h \ + data/fileio/CachedFile.h \ + data/fileio/CodedAudioFileReader.h \ + data/fileio/CSVFileReader.h \ + data/fileio/CSVFileWriter.h \ + data/fileio/CSVFormat.h \ + data/fileio/DataFileReader.h \ + data/fileio/DataFileReaderFactory.h \ + data/fileio/FileFinder.h \ + data/fileio/FileReadThread.h \ + data/fileio/FileSource.h \ + data/fileio/MatchFileReader.h \ + data/fileio/MatrixFile.h \ + data/fileio/MIDIFileReader.h \ + data/fileio/MIDIFileWriter.h \ + data/fileio/MP3FileReader.h \ + data/fileio/OggVorbisFileReader.h \ + data/fileio/PlaylistFileReader.h \ + data/fileio/QuickTimeFileReader.h \ + data/fileio/CoreAudioFileReader.h \ + data/fileio/ResamplingWavFileReader.h \ + data/fileio/WavFileReader.h \ + data/fileio/WavFileWriter.h \ + data/midi/MIDIEvent.h \ + data/midi/MIDIInput.h \ + data/midi/rtmidi/RtError.h \ + data/midi/rtmidi/RtMidi.h \ + data/model/AggregateWaveModel.h \ + data/model/AlignmentModel.h \ + data/model/Dense3DModelPeakCache.h \ + data/model/DenseThreeDimensionalModel.h \ + data/model/DenseTimeValueModel.h \ + data/model/EditableDenseThreeDimensionalModel.h \ + data/model/FFTModel.h \ + data/model/ImageModel.h \ + data/model/IntervalModel.h \ + data/model/Labeller.h \ + data/model/Model.h \ + data/model/ModelDataTableModel.h \ + data/model/NoteModel.h \ + data/model/PathModel.h \ + data/model/PowerOfSqrtTwoZoomConstraint.h \ + data/model/PowerOfTwoZoomConstraint.h \ + data/model/RangeSummarisableTimeValueModel.h \ + data/model/RegionModel.h \ + data/model/SparseModel.h \ + data/model/SparseOneDimensionalModel.h \ + data/model/SparseTimeValueModel.h \ + data/model/SparseValueModel.h \ + data/model/TabularModel.h \ + data/model/TextModel.h \ + data/model/WaveFileModel.h \ + data/model/WritableWaveFileModel.h \ + data/osc/OSCMessage.h \ + data/osc/OSCQueue.h +SOURCES += data/fft/FFTapi.cpp \ + data/fft/FFTDataServer.cpp \ + data/fft/FFTFileCacheReader.cpp \ + data/fft/FFTFileCacheWriter.cpp \ + data/fft/FFTMemoryCache.cpp \ + data/fileio/AudioFileReader.cpp \ + data/fileio/AudioFileReaderFactory.cpp \ + data/fileio/BZipFileDevice.cpp \ + data/fileio/CachedFile.cpp \ + data/fileio/CodedAudioFileReader.cpp \ + data/fileio/CSVFileReader.cpp \ + data/fileio/CSVFileWriter.cpp \ + data/fileio/CSVFormat.cpp \ + data/fileio/DataFileReaderFactory.cpp \ + data/fileio/FileReadThread.cpp \ + data/fileio/FileSource.cpp \ + data/fileio/MatchFileReader.cpp \ + data/fileio/MatrixFile.cpp \ + data/fileio/MIDIFileReader.cpp \ + data/fileio/MIDIFileWriter.cpp \ + data/fileio/MP3FileReader.cpp \ + data/fileio/OggVorbisFileReader.cpp \ + data/fileio/PlaylistFileReader.cpp \ + data/fileio/QuickTimeFileReader.cpp \ + data/fileio/CoreAudioFileReader.cpp \ + data/fileio/ResamplingWavFileReader.cpp \ + data/fileio/WavFileReader.cpp \ + data/fileio/WavFileWriter.cpp \ + data/midi/MIDIInput.cpp \ + data/midi/rtmidi/RtMidi.cpp \ + data/model/AggregateWaveModel.cpp \ + data/model/AlignmentModel.cpp \ + data/model/Dense3DModelPeakCache.cpp \ + data/model/DenseTimeValueModel.cpp \ + data/model/EditableDenseThreeDimensionalModel.cpp \ + data/model/FFTModel.cpp \ + data/model/Model.cpp \ + data/model/ModelDataTableModel.cpp \ + data/model/PowerOfSqrtTwoZoomConstraint.cpp \ + data/model/PowerOfTwoZoomConstraint.cpp \ + data/model/RangeSummarisableTimeValueModel.cpp \ + data/model/WaveFileModel.cpp \ + data/model/WritableWaveFileModel.cpp \ + data/osc/OSCMessage.cpp \ + data/osc/OSCQueue.cpp + +HEADERS += plugin/DSSIPluginFactory.h \ + plugin/DSSIPluginInstance.h \ + plugin/FeatureExtractionPluginFactory.h \ + plugin/LADSPAPluginFactory.h \ + plugin/LADSPAPluginInstance.h \ + plugin/PluginIdentifier.h \ + plugin/PluginXml.h \ + plugin/RealTimePluginFactory.h \ + plugin/RealTimePluginInstance.h \ + plugin/api/dssi.h \ + plugin/api/ladspa.h \ + plugin/plugins/SamplePlayer.h \ + plugin/api/alsa/asoundef.h \ + plugin/api/alsa/asoundlib.h \ + plugin/api/alsa/seq.h \ + plugin/api/alsa/seq_event.h \ + plugin/api/alsa/seq_midi_event.h \ + plugin/api/alsa/sound/asequencer.h +SOURCES += plugin/DSSIPluginFactory.cpp \ + plugin/DSSIPluginInstance.cpp \ + plugin/FeatureExtractionPluginFactory.cpp \ + plugin/LADSPAPluginFactory.cpp \ + plugin/LADSPAPluginInstance.cpp \ + plugin/PluginIdentifier.cpp \ + plugin/PluginXml.cpp \ + plugin/RealTimePluginFactory.cpp \ + plugin/RealTimePluginInstance.cpp \ + plugin/api/dssi_alsa_compat.c \ + plugin/plugins/SamplePlayer.cpp + +HEADERS += rdf/PluginRDFIndexer.h \ + rdf/PluginRDFDescription.h \ + rdf/RDFExporter.h \ + rdf/RDFFeatureWriter.h \ + rdf/RDFImporter.h \ + rdf/RDFTransformFactory.h +SOURCES += rdf/PluginRDFIndexer.cpp \ + rdf/PluginRDFDescription.cpp \ + rdf/RDFExporter.cpp \ + rdf/RDFFeatureWriter.cpp \ + rdf/RDFImporter.cpp \ + rdf/RDFTransformFactory.cpp + +HEADERS += system/Init.h \ + system/System.h +SOURCES += system/Init.cpp \ + system/System.cpp + +HEADERS += transform/CSVFeatureWriter.h \ + transform/FeatureExtractionModelTransformer.h \ + transform/FeatureWriter.h \ + transform/FileFeatureWriter.h \ + transform/RealTimeEffectModelTransformer.h \ + transform/Transform.h \ + transform/TransformDescription.h \ + transform/TransformFactory.h \ + transform/ModelTransformer.h \ + transform/ModelTransformerFactory.h +SOURCES += transform/CSVFeatureWriter.cpp \ + transform/FeatureExtractionModelTransformer.cpp \ + transform/FileFeatureWriter.cpp \ + transform/RealTimeEffectModelTransformer.cpp \ + transform/Transform.cpp \ + transform/TransformFactory.cpp \ + transform/ModelTransformer.cpp \ + transform/ModelTransformerFactory.cpp