changeset 802:98cf98a217d2 qt5

Merge
author Chris Cannam
date Thu, 09 May 2013 17:31:31 +0100
parents ed3779b2b4a8 (current diff) 9207c142b461 (diff)
children 2bd629a29fa3
files transform/FeatureExtractionModelTransformer.cpp
diffstat 8 files changed, 27 insertions(+), 174 deletions(-) [+]
line wrap: on
line diff
--- a/config.pri.in	Thu May 09 17:30:44 2013 +0100
+++ b/config.pri.in	Thu May 09 17:31:31 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	Thu May 09 17:30:44 2013 +0100
+++ b/configure	Thu May 09 17:31:31 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
@@ -5166,10 +5158,10 @@
 
 
 SV_MODULE_MODULE=vamphostsdk
-SV_MODULE_VERSION_TEST="vamp-hostsdk >= 2.3.1"
+SV_MODULE_VERSION_TEST="vamp-hostsdk >= 2.5"
 SV_MODULE_HEADER=vamp-hostsdk/PluginLoader.h
 SV_MODULE_LIB=vamp-hostsdk
-SV_MODULE_FUNC=libvamphostsdk_v_2_3_1_present
+SV_MODULE_FUNC=libvamphostsdk_v_2_5_present
 SV_MODULE_HAVE=HAVE_$(echo vamphostsdk | tr 'a-z' 'A-Z')
 SV_MODULE_FAILED=1
 if test -n "$vamphostsdk_LIBS" ; then
@@ -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	Thu May 09 17:30:44 2013 +0100
+++ b/configure.ac	Thu May 09 17:31:31 2013 +0100
@@ -80,9 +80,8 @@
 SV_MODULE_REQUIRED([sndfile],[sndfile >= 1.0.16],[sndfile.h],[sndfile],[sf_open])
 SV_MODULE_REQUIRED([samplerate],[samplerate >= 0.1.2],[samplerate.h],[samplerate],[src_new])
 SV_MODULE_REQUIRED([vamp],[vamp >= 2.1],[vamp/vamp.h],[],[])
-SV_MODULE_REQUIRED([vamphostsdk],[vamp-hostsdk >= 2.3.1],[vamp-hostsdk/PluginLoader.h],[vamp-hostsdk],[libvamphostsdk_v_2_3_1_present])
+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	Thu May 09 17:30:44 2013 +0100
+++ b/data/fileio/CoreAudioFileReader.cpp	Thu May 09 17:31:31 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/test/test.pro	Thu May 09 17:30:44 2013 +0100
+++ b/data/fileio/test/test.pro	Thu May 09 17:31:31 2013 +0100
@@ -1,7 +1,7 @@
 
 TEMPLATE = app
 
-LIBS += -L../../.. -L../../../debug -lsvcore
+LIBS += -L../../.. -L../../../release -L../../../../dataquay/release -lsvcore -ldataquay
 
 win32-g++ {
     INCLUDEPATH += ../../../../sv-dependency-builds/win32-mingw/include
--- a/data/model/SparseModel.h	Thu May 09 17:30:44 2013 +0100
+++ b/data/model/SparseModel.h	Thu May 09 17:31:31 2013 +0100
@@ -436,11 +436,15 @@
         PointListConstIterator i = i0;
 
         for (i = i0; i != i1; ++i) {
+//            std::cerr << "i->frame is " << i->frame << ", wanting " << frame << std::endl;
+
             if (i->frame < (int)frame) { continue; }
             if (indexAtFrame > 0) { --indexAtFrame; continue; }
             return i;
         }
 
+//        std::cerr << "returning i with i->frame = " << i->frame << std::endl;
+
         if (indexAtFrame > 0) {
             std::cerr << "WARNING: SparseModel::getPointListIteratorForRow: No iterator available for row " << row << " (frame = " << frame << ", index at frame = " << initialIndexAtFrame << ", leftover index " << indexAtFrame << ")" << std::endl;
         }
@@ -598,6 +602,7 @@
     QMutexLocker locker(&m_mutex);
 
     if (m_resolution == 0) {
+//        std::cerr << "getPointIterators: resolution == 0, returning end()" << std::endl;
         startItr = m_points.end();
         endItr = m_points.end();
         return;
@@ -609,7 +614,7 @@
     PointType startPoint(start), endPoint(end);
     
 //    std::cerr << "getPointIterators: start frame " << start << ", end frame " << end << ", m_resolution " << m_resolution << std::endl;
-    
+
     startItr = m_points.lower_bound(startPoint);
       endItr = m_points.upper_bound(endPoint);
 }
--- a/svcore.pro	Thu May 09 17:30:44 2013 +0100
+++ b/svcore.pro	Thu May 09 17:31:31 2013 +0100
@@ -17,15 +17,15 @@
 TARGET = svcore
 
 DEPENDPATH += . data plugin plugin/api/alsa
-INCLUDEPATH += . 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 ../dataquay
+    INCLUDEPATH += ../sv-dependency-builds/win32-mingw/include
 }
 win32-msvc* {
-    INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include ../dataquay
+    INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include
 }
 
 # Doesn't work with this library, which contains C99 as well as C++
--- a/transform/FeatureExtractionModelTransformer.cpp	Thu May 09 17:30:44 2013 +0100
+++ b/transform/FeatureExtractionModelTransformer.cpp	Thu May 09 17:31:31 2013 +0100
@@ -202,6 +202,14 @@
     size_t modelRate = input->getSampleRate();
     size_t modelResolution = 1;
 
+    if (m_descriptor->sampleType != 
+        Vamp::Plugin::OutputDescriptor::OneSamplePerStep) {
+        if (m_descriptor->sampleRate > input->getSampleRate()) {
+            std::cerr << "WARNING: plugin reports output sample rate as "
+                      << m_descriptor->sampleRate << " (can't display features with finer resolution than the input rate of " << input->getSampleRate() << ")" << std::endl;
+        }
+    }
+
     switch (m_descriptor->sampleType) {
 
     case Vamp::Plugin::OutputDescriptor::VariableSampleRate:
@@ -704,8 +712,6 @@
                 label = QString("[%1] %2").arg(i+1).arg(label);
             }
 
-            std::cerr << "Adding point at " << frame << " with value " << value << " and label " << label << std::endl;
-
             model->addPoint(SparseTimeValueModel::Point(frame, value, label));
         }