# HG changeset patch # User Chris Cannam # Date 1548342622 0 # Node ID ba3c0e70b5dd83c0f5f5d4f54184259f57f2dbb3 # Parent 70d19452631e8c0809af204da52fe622a29540eb Update to reflect bqaudiostream branch of sv libraries diff -r 70d19452631e -r ba3c0e70b5dd .hgignore --- a/.hgignore Fri Sep 14 14:55:24 2018 +0100 +++ b/.hgignore Thu Jan 24 15:10:22 2019 +0000 @@ -17,7 +17,7 @@ cov-int vamp-plugin-sdk svcore -piper-cpp +piper-vamp-cpp dataquay bqvec bqfft @@ -27,3 +27,4 @@ glob:.repoint-*.bin build_win32 build_win64 +glob:.repoint* diff -r 70d19452631e -r ba3c0e70b5dd base.pri --- a/base.pri Fri Sep 14 14:55:24 2018 +0100 +++ b/base.pri Thu Jan 24 15:10:22 2019 +0000 @@ -3,9 +3,12 @@ . \ bqvec \ bqvec/bqvec \ + bqthingfactory \ + bqaudiostream \ + bqaudiostream/bqaudiostream \ bqfft \ bqresample \ - piper-cpp \ + piper-vamp-cpp \ checker \ dataquay \ dataquay/dataquay \ @@ -28,5 +31,5 @@ DEFINES += NO_HIT_COUNTS -CONFIG += qt thread warn_on stl rtti exceptions c++11 +CONFIG += qt thread warn_on stl rtti exceptions diff -r 70d19452631e -r ba3c0e70b5dd base.pro --- a/base.pro Fri Sep 14 14:55:24 2018 +0100 +++ b/base.pro Thu Jan 24 15:10:22 2019 +0000 @@ -20,6 +20,10 @@ OBJECTS_DIR = o MOC_DIR = o +exists(repoint.pri) { + include(repoint.pri) +} + include(bq-files.pri) include(vamp-plugin-sdk-files.pri) include(svcore/files.pri) diff -r 70d19452631e -r ba3c0e70b5dd bq-files.pri --- a/bq-files.pri Fri Sep 14 14:55:24 2018 +0100 +++ b/bq-files.pri Thu Jan 24 15:10:22 2019 +0000 @@ -11,12 +11,18 @@ bqvec/pommier/sse_mathfun.h \ bqfft/bqfft/FFT.h \ bqresample/bqresample/Resampler.h \ - bqresample/speex/speex_resampler.h + bqresample/speex/speex_resampler.h \ + bqaudiostream/bqaudiostream/AudioReadStream.h \ + bqaudiostream/bqaudiostream/AudioReadStreamFactory.h \ + bqaudiostream/bqaudiostream/Exceptions.h \ + bqthingfactory/bqthingfactory/ThingFactory.h BQ_SOURCES += \ bqvec/src/Allocators.cpp \ bqvec/src/Barrier.cpp \ bqvec/src/VectorOpsComplex.cpp \ bqfft/src/FFT.cpp \ - bqresample/src/Resampler.cpp - + bqresample/src/Resampler.cpp \ + bqaudiostream/src/AudioReadStream.cpp \ + bqaudiostream/src/AudioReadStreamFactory.cpp \ + bqaudiostream/src/AudioStreamExceptions.cpp diff -r 70d19452631e -r ba3c0e70b5dd config.pri.in --- a/config.pri.in Fri Sep 14 14:55:24 2018 +0100 +++ b/config.pri.in Thu Jan 24 15:10:22 2019 +0000 @@ -1,6 +1,8 @@ CONFIG += @QMAKE_CONFIG@ +PREFIX_PATH = @prefix@ + DEFINES += @HAVES@ QMAKE_CC = @CC@ @@ -11,8 +13,11 @@ QMAKE_CXXFLAGS += @CXXFLAGS@ QMAKE_LFLAGS += @LDFLAGS@ +CONFIG += @CXXSTANDARD@ + linux*:LIBS += -L$$PWD -lbase -lasound -ldl +macx*:DEFINES += HAVE_COREAUDIO macx*:LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices LIBS += @LIBS@ diff -r 70d19452631e -r ba3c0e70b5dd configure.ac --- a/configure.ac Fri Sep 14 14:55:24 2018 +0100 +++ b/configure.ac Thu Jan 24 15:10:22 2019 +0000 @@ -40,8 +40,7 @@ SV_CHECK_QT SV_DEFINES_DEBUG="-DDEBUG -DBUILD_DEBUG -DWANT_TIMING" -SV_DEFINES_RELEASE="-DNDEBUG -DBUILD_RELEASE -DNO_TIMING" -SV_DEFINES_MINIMAL="$SV_DEFINES_RELEASE" +SV_DEFINES_RELEASE="-DNDEBUG -DBUILD_RELEASE -DNO_TIMING -DNO_HIT_COUNTS" # Now we have: USER_CXXFLAGS contains any flags the user set # explicitly; AUTOCONF_CXXFLAGS contains flags that Autoconf thought @@ -49,34 +48,46 @@ # allow ourselves to be overridden (later) by the former CXXFLAGS_DEBUG="$AUTOCONF_CXXFLAGS" +OPTFLAGS_DEBUG="-O2" +LDFLAGS_DEBUG="" CXXFLAGS_RELEASE="$AUTOCONF_CXXFLAGS" -CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" +OPTFLAGS_RELEASE="-O2" +LDFLAGS_RELEASE="" +CXXSTANDARD=c++14 if test "x$GCC" = "xyes"; then - CXXFLAGS_ANY="-std=c++11 -fpic -Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe" + CXXFLAGS_ANY="-fpic -Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe" CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g -Werror" - CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O3 -ffast-math" - CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0" + OPTFLAGS_DEBUG="-O2" + CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0" + OPTFLAGS_RELEASE="-O3 -ffast-math" + LIBS_DEBUG="$LIBS" + AX_CHECK_COMPILE_FLAG(--std=$CXXSTANDARD, [], [AC_MSG_NOTICE([Compiler does not appear to support $CXXSTANDARD, falling back to c++11]) + CXXSTANDARD=c++11]) fi -CXXFLAGS_BUILD="$CXXFLAGS_RELEASE" +CXXFLAGS_BUILD="$CXXFLAGS_RELEASE $OPTFLAGS_RELEASE" +LDFLAGS_BUILD="$LDFLAGS_RELEASE $OPTFLAGS_RELEASE" SV_DEFINES_BUILD="$SV_DEFINES_RELEASE" QMAKE_CONFIG="release" AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable debug support [default=no]])],[AC_MSG_NOTICE([enabling debug build]) QMAKE_CONFIG="debug" -CXXFLAGS_BUILD="$CXXFLAGS_DEBUG" -SV_DEFINES_BUILD="$SV_DEFINES_DEBUG"]) +CXXFLAGS_BUILD="$CXXFLAGS_DEBUG $OPTFLAGS_DEBUG" +LDFLAGS_BUILD="$LDFLAGS_DEBUG" +SV_DEFINES_BUILD="$SV_DEFINES_DEBUG" +LIBS="$LIBS_DEBUG"]) if test x"$USER_CXXFLAGS" != x; then AC_MSG_NOTICE([The CXXFLAGS environment variable is set to "$USER_CXXFLAGS".]) AC_MSG_NOTICE(Overriding default compiler flags with the above user setting.) CXXFLAGS_BUILD="$USER_CXXFLAGS" - CXXFLAGS_MINIMAL="$USER_CXXFLAGS" + LDFLAGS_BUILD="" fi CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD" +LDFLAGS="$LDFLAGS_BUILD" SV_MODULE_REQUIRED([bz2],[],[bzlib.h],[bz2],[BZ2_bzReadOpen]) SV_MODULE_REQUIRED([fftw3],[fftw3 >= 3.0.0],[fftw3.h],[fftw3],[fftw_execute]) @@ -92,6 +103,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]) AC_SUBST(PERL) AC_SUBST(XARGS) @@ -101,7 +113,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) -AC_SUBST(CXXFLAGS_MINIMAL) +AC_SUBST(CXXSTANDARD) AC_SUBST(LDFLAGS) AC_SUBST(HAVES) AC_SUBST(LIBS) @@ -109,6 +121,8 @@ AC_SUBST(CC) AC_SUBST(CXX) +AC_SUBST(prefix) + AC_SUBST(QMAKE_CONFIG) AC_CONFIG_FILES([config.pri]) diff -r 70d19452631e -r ba3c0e70b5dd noconfig.pri --- a/noconfig.pri Fri Sep 14 14:55:24 2018 +0100 +++ b/noconfig.pri Thu Jan 24 15:10:22 2019 +0000 @@ -1,8 +1,10 @@ + +CONFIG += c++14 CONFIG += release +#CONFIG += debug -#CONFIG -= release -#CONFIG += debug +PREFIX_PATH = /usr/local DEFINES += NDEBUG BUILD_RELEASE DEFINES += NO_TIMING @@ -17,8 +19,9 @@ HAVE_SNDFILE \ HAVE_SAMPLERATE \ HAVE_MAD \ - HAVE_ID3TAG - + HAVE_ID3TAG \ + HAVE_OPUS + # Default set of libs for the above. Config sections below may update # these. @@ -34,6 +37,8 @@ -lvorbis \ -lvorbisenc \ -lvorbisfile \ + -lopusfile \ + -lopus \ -logg \ -lmad \ -lid3tag \ @@ -54,7 +59,7 @@ QMAKE_CXXFLAGS_RELEASE += -ffast-math - LIBS += -lwinmm -lws2_32 + LIBS += -lmfplat -lmfreadwrite -lmfuuid -lpropsys -lwinmm -lws2_32 } win32-msvc* { @@ -83,19 +88,19 @@ LIBS -= -lsord-0 -lserd-0 LIBS += -lsord -lserd - 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 + QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math -flto - DEFINES += HAVE_VDSP + DEFINES += HAVE_COREAUDIO HAVE_VDSP LIBS += \ -framework CoreAudio \ -framework CoreMidi \ diff -r 70d19452631e -r ba3c0e70b5dd repoint --- a/repoint Fri Sep 14 14:55:24 2018 +0100 +++ b/repoint Thu Jan 24 15:10:22 2019 +0000 @@ -58,7 +58,7 @@ # That is fixed in v5.7.1, so we could promote it up the order # again at some point in future elif echo | poly -v 2>/dev/null | grep -q 'Poly/ML'; then - sml="poly" + sml="polyml" elif mlton 2>&1 | grep -q 'MLton'; then sml="mlton" # MLKit is at the bottom because it leaves compiled files around @@ -109,7 +109,7 @@ done case "$sml" in - poly) + polyml) if [ -n "$local_install" ] && polyc --help >/dev/null 2>&1 ; then if [ ! -x "$gen_out" ]; then polyc -o "$gen_out" "$program" diff -r 70d19452631e -r ba3c0e70b5dd repoint-lock.json --- a/repoint-lock.json Fri Sep 14 14:55:24 2018 +0100 +++ b/repoint-lock.json Thu Jan 24 15:10:22 2019 +0000 @@ -4,28 +4,34 @@ "pin": "da86fb0bccb3" }, "svcore": { - "pin": "a92e94215863" + "pin": "40d8b01efbc6" }, "checker": { - "pin": "2e8a5f665a07" + "pin": "5c60e26e16ca" }, - "piper-cpp": { - "pin": "44cb74e186a703e7e6ce403aa295913a87b88d62" + "piper-vamp-cpp": { + "pin": "0e3328c6091f59c912e25bc392a7dc75182be1c7" }, "dataquay": { "pin": "807b55408d9e" }, "bqvec": { - "pin": "3c9de9e7f6e8" + "pin": "be1ce11183f4" }, "bqfft": { "pin": "a766fe47501b" }, "bqresample": { - "pin": "a9a5555d9b6d" + "pin": "f5dee7d40378" + }, + "bqthingfactory": { + "pin": "7686116dcdd5" + }, + "bqaudiostream": { + "pin": "65e940fb6436" }, "sv-dependency-builds": { - "pin": "f1a9b270e043" + "pin": "7aeed7906520" } } } diff -r 70d19452631e -r ba3c0e70b5dd repoint-project.json --- a/repoint-project.json Fri Sep 14 14:55:24 2018 +0100 +++ b/repoint-project.json Thu Jan 24 15:10:22 2019 +0000 @@ -16,18 +16,18 @@ }, "svcore": { "vcs": "hg", - "service": "soundsoftware" + "service": "soundsoftware", + "branch": "bqaudiostream" }, "checker": { "vcs": "hg", "service": "soundsoftware", "repository": "vamp-plugin-load-checker" }, - "piper-cpp": { + "piper-vamp-cpp": { "vcs": "git", "service": "github", - "owner": "piper-audio", - "repository": "piper-vamp-cpp" + "owner": "piper-audio" }, "dataquay": { "vcs": "hg", @@ -49,6 +49,16 @@ "service": "bitbucket", "owner": "breakfastquay" }, + "bqthingfactory": { + "vcs": "hg", + "service": "bitbucket", + "owner": "breakfastquay" + }, + "bqaudiostream": { + "vcs": "hg", + "service": "bitbucket", + "owner": "breakfastquay" + }, "sv-dependency-builds": { "vcs": "hg", "service": "soundsoftware" diff -r 70d19452631e -r ba3c0e70b5dd repoint.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/repoint.pri Thu Jan 24 15:10:22 2019 +0000 @@ -0,0 +1,7 @@ + +repoint.target = $$PWD/.repoint.point +repoint.depends = $$PWD/repoint-project.json $$PWD/repoint-lock.json +repoint.commands = $$PWD/repoint install --directory $$PWD + +QMAKE_EXTRA_TARGETS += repoint +PRE_TARGETDEPS += $$repoint.target diff -r 70d19452631e -r ba3c0e70b5dd repoint.sml --- a/repoint.sml Fri Sep 14 14:55:24 2018 +0100 +++ b/repoint.sml Thu Jan 24 15:10:22 2019 +0000 @@ -38,7 +38,7 @@ authorization. *) -val repoint_version = "0.9.98" +val repoint_version = "1.1" datatype vcs = @@ -136,6 +136,7 @@ structure RepointFilenames = struct val project_file = "repoint-project.json" val project_lock_file = "repoint-lock.json" + val project_completion_file = ".repoint.point" val user_config_file = ".repoint.json" val archive_dir = ".repoint-archive" end @@ -215,6 +216,7 @@ val nonempty_dir_exists : string -> bool val project_spec_path : string -> string val project_lock_path : string -> string + val project_completion_path : string -> string val verbose : unit -> bool end = struct @@ -272,6 +274,9 @@ fun project_lock_path rootpath = project_file_path rootpath (RepointFilenames.project_lock_file) + fun project_completion_path rootpath = + project_file_path rootpath (RepointFilenames.project_completion_file) + fun trim str = hd (String.fields (fn x => x = #"\n" orelse x = #"\r") str) @@ -2420,7 +2425,14 @@ in JsonBits.save_json_to lock_file lock_json end - + +fun checkpoint_completion_file rootpath = + let val completion_file = FileBits.project_completion_path rootpath + val stream = TextIO.openOut completion_file + in + TextIO.closeOut stream + end + fun pad_to n str = if n <= String.size str then str else pad_to n (str ^ " ") @@ -2586,8 +2598,12 @@ val _ = if List.exists (fn (_, OK _) => true | _ => false) outcomes then lock_project project else OS.Process.success + val return_code = return_code_for outcomes in - return_code_for outcomes + if OS.Process.isSuccess return_code + then checkpoint_completion_file (#rootpath context) + else (); + return_code end fun load_local_project pintype = @@ -2625,18 +2641,23 @@ fun usage () = (print "\nRepoint "; version (); - print ("\nA simple manager for third-party source code dependencies.\n\n" + print ("\n A simple manager for third-party source code dependencies.\n" + ^ " http://all-day-breakfast.com/repoint/\n\n" ^ "Usage:\n\n" - ^ " repoint \n\n" + ^ " repoint []\n\n" ^ "where is one of:\n\n" ^ " status print quick report on local status only, without using network\n" ^ " review check configured libraries against their providers, and report\n" ^ " install update configured libraries according to project specs and lock file\n" ^ " update update configured libraries and lock file according to project specs\n" - ^ " lock update lock file to match local library status\n" - ^ " archive pack up project and all libraries into an archive file\n" - ^ " (invoke as 'repoint archive target-file.tar.gz')\n" - ^ " version print the Repoint version number and exit\n\n"); + ^ " lock rewrite lock file to match local library status\n" + ^ " archive pack up project and all libraries into an archive file:\n" + ^ " invoke as 'repoint archive targetfile.tar.gz --exclude unwanted.txt'\n" + ^ " version print the Repoint version number and exit\n\n" + ^ "and may include:\n\n" + ^ " --directory \n" + ^ " change to directory before doing anything; in particular,\n" + ^ " expect to find project spec file in that directory\n\n"); OS.Process.failure) fun archive target args = @@ -2647,8 +2668,26 @@ with_local_project USE_LOCKFILE (Archive.archive (target, xs)) | _ => usage () +fun handleSystemArgs args = + let fun handleSystemArgs' leftover args = + case args of + "--directory"::dir::rest => + (OS.FileSys.chDir dir; + handleSystemArgs' leftover rest) + | arg::rest => + handleSystemArgs' (leftover @ [arg]) rest + | [] => leftover + in + OK (handleSystemArgs' [] args) + handle e => ERROR (exnMessage e) + end + fun repoint args = - let val return_code = + case handleSystemArgs args of + ERROR e => (print ("Error: " ^ e ^ "\n"); + OS.Process.exit OS.Process.failure) + | OK args => + let val return_code = case args of ["review"] => review () | ["status"] => status () @@ -2660,10 +2699,9 @@ | arg::_ => (print ("Error: unknown argument \"" ^ arg ^ "\"\n"); usage ()) | _ => usage () - in - OS.Process.exit return_code; - () - end + in + OS.Process.exit return_code + end fun main () = repoint (CommandLine.arguments ()) diff -r 70d19452631e -r ba3c0e70b5dd runner/MultiplexedReader.h --- a/runner/MultiplexedReader.h Fri Sep 14 14:55:24 2018 +0100 +++ b/runner/MultiplexedReader.h Thu Jan 24 15:10:22 2019 +0000 @@ -33,6 +33,9 @@ virtual QString getError() const override { return m_error; } virtual bool isQuicklySeekable() const override { return m_quicklySeekable; } + virtual QString getTitle() const override { return ""; } + virtual QString getMaker() const override { return ""; } + virtual floatvec_t getInterleavedFrames (sv_frame_t start, sv_frame_t count) const override;