changeset 2196:813bc4295860 bqaudiostream

Merge from default branch
author Chris Cannam
date Wed, 23 Jan 2019 14:45:46 +0000
parents d97c264355a5 (diff) 145e09dbbaab (current diff)
children 1a9541992121
files repoint-lock.json repoint-project.json
diffstat 13 files changed, 293 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed Jan 16 14:27:24 2019 +0000
+++ b/.hgignore	Wed Jan 23 14:45:46 2019 +0000
@@ -54,6 +54,7 @@
 glob:.repoint*
 build_win32
 build_win64
+build_win64_debug
 *.AppImage
 *.AppDir
 Dockerfile*.gen
--- a/base.pri	Wed Jan 16 14:27:24 2019 +0000
+++ b/base.pri	Wed Jan 23 14:45:46 2019 +0000
@@ -7,6 +7,9 @@
 	bqresample \
 	bqaudioio \
 	bqaudioio/bqaudioio \
+	bqaudiostream \
+	bqaudiostream/bqaudiostream \
+	bqthingfactory \
 	piper-vamp-cpp \
 	checker \
 	checker/checker \
@@ -38,4 +41,3 @@
 macx*:    DEFINES += USE_PTHREADS
 
 CONFIG += qt thread warn_on stl rtti exceptions
-
--- a/bq-files.pri	Wed Jan 16 14:27:24 2019 +0000
+++ b/bq-files.pri	Wed Jan 23 14:45:46 2019 +0000
@@ -24,6 +24,10 @@
 	bqaudioio/src/Log.h \
 	bqaudioio/src/PortAudioIO.h \
 	bqaudioio/src/PulseAudioIO.h \
+        bqaudiostream/bqaudiostream/AudioReadStream.h \
+        bqaudiostream/bqaudiostream/AudioReadStreamFactory.h \
+        bqaudiostream/bqaudiostream/Exceptions.h \
+        bqthingfactory/bqthingfactory/ThingFactory.h \
 	rubberband/rubberband/RubberBandStretcher.h
 
 BQ_SOURCES += \
@@ -40,5 +44,8 @@
 	bqaudioio/src/ResamplerWrapper.cpp \
 	bqaudioio/src/SystemPlaybackTarget.cpp \
 	bqaudioio/src/SystemRecordSource.cpp \
+        bqaudiostream/src/AudioReadStream.cpp \
+        bqaudiostream/src/AudioReadStreamFactory.cpp \
+        bqaudiostream/src/AudioStreamExceptions.cpp \
         rubberband-all.cpp
         
--- a/configure	Wed Jan 16 14:27:24 2019 +0000
+++ b/configure	Wed Jan 23 14:45:46 2019 +0000
@@ -632,6 +632,8 @@
 PERL
 X11_LIBS
 X11_CFLAGS
+opus_LIBS
+opus_CFLAGS
 id3tag_LIBS
 id3tag_CFLAGS
 mad_LIBS
@@ -780,6 +782,8 @@
 mad_LIBS
 id3tag_CFLAGS
 id3tag_LIBS
+opus_CFLAGS
+opus_LIBS
 X11_CFLAGS
 X11_LIBS'
 
@@ -1456,6 +1460,8 @@
   id3tag_CFLAGS
               C compiler flags for id3tag, overriding pkg-config
   id3tag_LIBS linker flags for id3tag, overriding pkg-config
+  opus_CFLAGS C compiler flags for opus, overriding pkg-config
+  opus_LIBS   linker flags for opus, overriding pkg-config
   X11_CFLAGS  C compiler flags for X11, overriding pkg-config
   X11_LIBS    linker flags for X11, overriding pkg-config
 
@@ -7063,6 +7069,161 @@
 fi
 
 
+SV_MODULE_MODULE=opus
+SV_MODULE_VERSION_TEST="opusfile"
+SV_MODULE_HEADER=opus/opusfile.h
+SV_MODULE_LIB=opusfile
+SV_MODULE_FUNC=op_read_float
+SV_MODULE_HAVE=HAVE_$(echo opus | tr 'a-z' 'A-Z')
+SV_MODULE_FAILED=1
+if test -n "$opus_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 $opus_CFLAGS"
+   LIBS="$LIBS $opus_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 opus" >&5
+$as_echo_n "checking for opus... " >&6; }
+
+if test -n "$opus_CFLAGS"; then
+    pkg_cv_opus_CFLAGS="$opus_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_opus_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 "$opus_LIBS"; then
+    pkg_cv_opus_LIBS="$opus_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_opus_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
+	        opus_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1`
+        else
+	        opus_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 "$opus_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+$as_echo "$as_me: Failed to find optional 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 optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5
+$as_echo "$as_me: Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;}
+else
+	opus_CFLAGS=$pkg_cv_opus_CFLAGS
+	opus_LIBS=$pkg_cv_opus_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $opus_CFLAGS";LIBS="$LIBS $opus_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";SV_MODULE_FAILED=""
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE" >&5
+$as_echo "$as_me: Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE" >&6;}
+fi
+
+
+   if test -z "$SV_MODULE_FAILED"; then
+      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_echo "$as_me:${as_lineno-$LINENO}: Failed to find library $SV_MODULE_LIB for optional module $SV_MODULE_MODULE" >&5
+$as_echo "$as_me: Failed to find library $SV_MODULE_LIB for optional module $SV_MODULE_MODULE" >&6;}
+fi
+
+      fi
+   fi
+fi
+
+
 # Link in -lX11 if it exists -- this is for the X error handler
 
 SV_MODULE_MODULE=X11
--- a/configure.ac	Wed Jan 16 14:27:24 2019 +0000
+++ b/configure.ac	Wed Jan 23 14:45:46 2019 +0000
@@ -123,6 +123,7 @@
 SV_MODULE_OPTIONAL([fishsound],[fishsound >= 1.0.0],[fishsound/fishsound.h],[fishsound],[fish_sound_new])
 SV_MODULE_OPTIONAL([mad],[mad >= 0.15.0],[mad.h],[mad],[mad_decoder_init])
 SV_MODULE_OPTIONAL([id3tag],[id3tag >= 0.15.0],[id3tag.h],[id3tag],[id3_tag_new])
+SV_MODULE_OPTIONAL([opus],[opusfile],[opus/opusfile.h],[opusfile],[op_read_float])
 
 # Link in -lX11 if it exists -- this is for the X error handler
 SV_MODULE_OPTIONAL([X11],[x11 >= 1.0.0],[X11/X.h],[x11],[XGetErrorText])
--- a/deploy/win64/build-32.bat	Wed Jan 16 14:27:24 2019 +0000
+++ b/deploy/win64/build-32.bat	Wed Jan 23 14:45:46 2019 +0000
@@ -48,8 +48,12 @@
 rem some of these expect to be run from the project root
 cd ..
 build_win32\release\test-svcore-base
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win32\release\test-svcore-system
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win32\release\test-svcore-data-fileio
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win32\release\test-svcore-data-model
+if %errorlevel% neq 0 exit /b %errorlevel%
 
 set PATH=%ORIGINALPATH%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/win64/build-64-debug.bat	Wed Jan 23 14:45:46 2019 +0000
@@ -0,0 +1,69 @@
+rem  Run this from within the top-level SV dir: deploy\win64\build-64.bat
+rem  To build from clean, delete the folder build_win64_debug first
+
+rem  NB you will probably also have to change the CONFIG in noconfig.pri
+rem  from release to debug
+
+echo on
+
+set STARTPWD=%CD%
+
+set QTDIR=C:\Qt\5.11.2\msvc2017_64
+if not exist %QTDIR% (
+@   echo Could not find 64-bit Qt
+@   exit /b 2
+)
+
+if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+@   echo "Could not find MSVC vars batch file"
+@   exit /b 2
+)
+
+call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
+
+set ORIGINALPATH=%PATH%
+set PATH=%PATH%;C:\Program Files (x86)\SMLNJ\bin;%QTDIR%\bin
+
+cd %STARTPWD%
+
+call .\repoint install
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+sv-dependency-builds\win64-msvc\bin\capnp -Isv-dependency-builds/win64-msvc/include compile --src-prefix=piper/capnp -osv-dependency-builds/win64-msvc/bin/capnpc-c++:piper-vamp-cpp/vamp-capnp piper/capnp/piper.capnp
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+mkdir build_win64_debug
+cd build_win64_debug
+
+qmake -spec win32-msvc -r -tp vc ..\sonic-visualiser.pro
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+msbuild sonic-visualiser.sln /t:Build /p:Configuration=Debug
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+copy .\checker\debug\vamp-plugin-load-checker.exe .\debug
+
+copy %QTDIR%\bin\Qt5Cored.dll .\debug
+copy %QTDIR%\bin\Qt5Guid.dll .\debug
+copy %QTDIR%\bin\Qt5Widgetsd.dll .\debug
+copy %QTDIR%\bin\Qt5Networkd.dll .\debug
+copy %QTDIR%\bin\Qt5Xmld.dll .\debug
+copy %QTDIR%\bin\Qt5Svgd.dll .\debug
+copy %QTDIR%\bin\Qt5Testd.dll .\debug
+copy %QTDIR%\plugins\platforms\qminimald.dll .\debug
+copy %QTDIR%\plugins\platforms\qwindowsd.dll .\debug
+copy %QTDIR%\plugins\styles\qwindowsvistastyled.dll .\debug
+copy ..\sv-dependency-builds\win64-msvc\lib\libsndfile-1.dll .\debug
+
+rem some of these expect to be run from the project root
+cd ..
+build_win64_debug\debug\test-svcore-base
+if %errorlevel% neq 0 exit /b %errorlevel%
+build_win64_debug\debug\test-svcore-system
+if %errorlevel% neq 0 exit /b %errorlevel%
+build_win64_debug\debug\test-svcore-data-fileio
+if %errorlevel% neq 0 exit /b %errorlevel%
+build_win64_debug\debug\test-svcore-data-model
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+set PATH=%ORIGINALPATH%
--- a/deploy/win64/build-64.bat	Wed Jan 16 14:27:24 2019 +0000
+++ b/deploy/win64/build-64.bat	Wed Jan 23 14:45:46 2019 +0000
@@ -55,8 +55,12 @@
 rem some of these expect to be run from the project root
 cd ..
 build_win64\release\test-svcore-base
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win64\release\test-svcore-system
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win64\release\test-svcore-data-fileio
+if %errorlevel% neq 0 exit /b %errorlevel%
 build_win64\release\test-svcore-data-model
+if %errorlevel% neq 0 exit /b %errorlevel%
 
 set PATH=%ORIGINALPATH%
--- a/noconfig.pri	Wed Jan 16 14:27:24 2019 +0000
+++ b/noconfig.pri	Wed Jan 23 14:45:46 2019 +0000
@@ -1,8 +1,8 @@
 
 CONFIG += c++14
 
-CONFIG += release
-#CONFIG += debug
+#CONFIG += release
+CONFIG += debug
 
 PREFIX_PATH = /usr/local
 
@@ -24,6 +24,7 @@
 	HAVE_LIBLO \
 	HAVE_MAD \
 	HAVE_ID3TAG \
+        HAVE_OPUS \
 	HAVE_PORTAUDIO
 
 # Default set of libs for the above. Config sections below may update
@@ -40,6 +41,8 @@
 	-lvorbis \
 	-lvorbisenc \
 	-lvorbisfile \
+        -lopusfile \
+        -lopus \
 	-logg \
 	-lmad \
 	-lid3tag \
@@ -60,7 +63,11 @@
 
     LIBS += -Lrelease -L$$PWD/sv-dependency-builds/win32-mingw/lib
 
-    DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
+    DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE HAVE_MEDIAFOUNDATION
+
+#!!! to add
+    DEFINES -= HAVE_OPUS
+    LIBS -= -lopusfile
 
     QMAKE_CXXFLAGS_RELEASE += -ffast-math
 
@@ -68,7 +75,7 @@
     DEFINES -= HAVE_LIBLO
     LIBS -= -llo
     
-    LIBS += -lwinmm -lws2_32
+    LIBS += -lmfplat -lmfreadwrite -lmfuuid -lpropsys -lwinmm -lws2_32 
 }
 
 win32-msvc* {
@@ -91,7 +98,11 @@
             -L$$PWD/sv-dependency-builds/win64-msvc/lib
     }
 
-    DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE
+    DEFINES += NOMINMAX _USE_MATH_DEFINES CAPNP_LITE HAVE_MEDIAFOUNDATION
+
+#!!! to add
+    DEFINES -= HAVE_OPUS
+    LIBS -= -lopusfile
 
     QMAKE_CXXFLAGS_RELEASE += -fp:fast -gl
     QMAKE_LFLAGS_RELEASE += -ltcg
@@ -107,14 +118,14 @@
     DEFINES -= HAVE_LIBLO
     LIBS -= -llo
     
-    LIBS += -ladvapi32 -lwinmm -lws2_32
+    LIBS += -lmfplat -lmfreadwrite -lmfuuid -lpropsys -ladvapi32 -lwinmm -lws2_32
 }
 
 macx* {
 
     # All Mac builds are 64-bit these days.
 
-    INCLUDEPATH += $$PWD/sv-dependency-builds/osx/include
+    INCLUDEPATH += $$PWD/sv-dependency-builds/osx/include $$PWD/sv-dependency-builds/osx/include/opus
     LIBS += -L$$PWD/sv-dependency-builds/osx/lib -L$$PWD
 
     QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math -flto
--- a/repoint-lock.json	Wed Jan 16 14:27:24 2019 +0000
+++ b/repoint-lock.json	Wed Jan 23 14:45:46 2019 +0000
@@ -4,16 +4,16 @@
       "pin": "da86fb0bccb3"
     },
     "svcore": {
-      "pin": "841b2a3e606d"
+      "pin": "ce185d4dd408"
     },
     "svgui": {
-      "pin": "fa986b91d77f"
+      "pin": "2487521e857b"
     },
     "svapp": {
       "pin": "6fd0ebfd2bbe"
     },
     "checker": {
-      "pin": "81ce3ba92b16"
+      "pin": "5c60e26e16ca"
     },
     "piper": {
       "pin": "f5a04ffe4d5a0ae01e77018a86a59b48a425e674"
@@ -25,7 +25,7 @@
       "pin": "807b55408d9e"
     },
     "bqvec": {
-      "pin": "47a6794091d8"
+      "pin": "be1ce11183f4"
     },
     "bqfft": {
       "pin": "a766fe47501b"
@@ -36,11 +36,17 @@
     "bqaudioio": {
       "pin": "8c4162878ae6"
     },
+    "bqaudiostream": {
+      "pin": "65e940fb6436"
+    },
+    "bqthingfactory": {
+      "pin": "7686116dcdd5"
+    },
     "rubberband": {
       "pin": "6990f06c9f49"
     },
     "sv-dependency-builds": {
-      "pin": "85d5306e114e"
+      "pin": "7aeed7906520"
     },
     "icons/scalable": {
       "pin": "1c8844bfa946"
--- a/repoint-project.json	Wed Jan 16 14:27:24 2019 +0000
+++ b/repoint-project.json	Wed Jan 23 14:45:46 2019 +0000
@@ -16,7 +16,8 @@
         },
         "svcore": {
             "vcs": "hg",
-            "service": "soundsoftware"
+            "service": "soundsoftware",
+            "branch": "bqaudiostream"
         },
         "svgui": {
             "vcs": "hg",
@@ -66,6 +67,16 @@
             "service": "bitbucket",
             "owner": "breakfastquay"
         },
+        "bqaudiostream": {
+            "vcs": "hg",
+            "service": "bitbucket",
+            "owner": "breakfastquay"
+        },
+        "bqthingfactory": {
+            "vcs": "hg",
+            "service": "bitbucket",
+            "owner": "breakfastquay"
+        },
         "rubberband": {
             "vcs": "hg",
             "service": "bitbucket",
--- a/server.pro	Wed Jan 16 14:27:24 2019 +0000
+++ b/server.pro	Wed Jan 23 14:45:46 2019 +0000
@@ -1,7 +1,7 @@
 
 TEMPLATE = app
 
-CONFIG += stl exceptions console warn_on
+CONFIG += stl exceptions console warn_on object_parallel_to_source
 CONFIG -= qt
 
 exists(config.pri) {
--- a/version.h	Wed Jan 16 14:27:24 2019 +0000
+++ b/version.h	Wed Jan 23 14:45:46 2019 +0000
@@ -1,1 +1,1 @@
-#define SV_VERSION "3.2.1"
+#define SV_VERSION "3.3"