From adc722204460b5030010a334a9cf135b060aacfb Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?= Date: Wed, 30 Aug 2023 09:23:08 +0200 Subject: [PATCH] New upstream version 2.0.1+ds --- CMakeLists.txt | 5 +- LICENSE.md | 10 +- build | 23 +- build-aux/flatpak/org.jacktrip.JackTrip.json | 20 +- docs/Build/Linux.md | 129 +- docs/VirtualStudio.md | 26 + docs/changelog.yml | 28 + docs/images/jacktrip_virtual_studio.png | Bin 0 -> 196096 bytes docs/index.md | 9 + externals/Simple-FFT/LICENSE.md | 21 + externals/Simple-FFT/README.md | 98 + .../include/simple_fft/check_fft.hpp | 571 +++++ .../include/simple_fft/copy_array.hpp | 173 ++ .../include/simple_fft/error_handling.hpp | 64 + externals/Simple-FFT/include/simple_fft/fft.h | 98 + .../Simple-FFT/include/simple_fft/fft.hpp | 162 ++ .../include/simple_fft/fft_impl.hpp | 515 ++++ .../include/simple_fft/fft_settings.h | 26 + jacktrip.pro | 33 +- linux/README.md | 21 + linux/flatpak/org.jacktrip.JackTrip.Devel.yml | 51 - .../org.jacktrip.JackTrip.Devel.yml.j2 | 51 - linux/flatpak/org.jacktrip.JackTrip.yml | 49 - linux/qt/1d21c39.diff | 38 - .../JackTrip.app_template/Contents/Info.plist | 4 +- macos/assemble_app.sh | 59 +- macos/entitlements.plist | 6 + macos/meson_native_minversion_10.13.ini | 10 + macos/meson_native_minversion_10.14.ini | 10 + macos/meson_native_universal.ini | 10 + macos/meson_native_universal_10.13.ini | 11 + macos/meson_native_universal_10.14.ini | 11 + macos/qt/configure.json.patch | 20 - meson.build | 123 +- meson_options.txt | 3 +- mkdocs.yml | 1 + releases/edge/mac-manifests.json | 90 + releases/edge/win-manifests.json | 90 + releases/stable/linux-manifests.json | 30 + releases/stable/mac-manifests.json | 30 + releases/stable/win-manifests.json | 30 + src/Analyzer.cpp | 4 +- src/Analyzer.h | 6 +- src/AudioInterface.cpp | 101 +- src/AudioInterface.h | 26 +- src/AudioTester.cpp | 10 +- src/AudioTester.h | 8 +- src/Compressor.cpp | 2 +- src/Effects.h | 10 +- src/JackAudioInterface.cpp | 25 +- src/JackTrip.cpp | 51 +- src/JackTrip.h | 35 +- src/JackTripWorker.cpp | 2 +- src/JitterBuffer.cpp | 31 +- src/JitterBuffer.h | 5 +- src/Limiter.cpp | 2 +- src/Limiter.h | 4 +- src/Meter.cpp | 6 +- src/Monitor.cpp | 2 +- src/PacketHeader.cpp | 2 +- src/Reverb.cpp | 2 +- src/RingBuffer.cpp | 4 +- src/RtAudioInterface.cpp | 594 +++-- src/RtAudioInterface.h | 54 +- src/StereoToMono.cpp | 2 +- src/Tone.cpp | 2 +- src/UdpDataProtocol.cpp | 12 +- src/Volume.cpp | 2 +- src/gui/AppIcon.qml | 29 + src/gui/AudioInterfaceMode.h | 7 +- src/gui/AudioSettings.qml | 733 ++---- src/gui/Browse.qml | 38 +- src/gui/ChangeDevices.qml | 510 ++++ src/gui/Connected.qml | 1601 +----------- src/gui/DeviceControls.qml | 202 ++ src/gui/DeviceControlsGroup.qml | 332 +++ src/gui/DeviceRefreshButton.qml | 38 + src/gui/DeviceWarning.qml | 52 + src/gui/Failed.qml | 23 +- src/gui/FeedbackSurvey.qml | 442 ++++ src/gui/FirstLaunch.qml | 10 +- src/gui/Footer.qml | 184 ++ src/gui/InfoTooltip.qml | 63 + src/gui/JTVS.png | Bin 104329 -> 196096 bytes src/gui/Login.qml | 39 +- src/gui/Meter.qml | 41 +- src/gui/MeterBars.qml | 185 +- src/gui/Permissions.qml | 205 ++ src/gui/Recommendations.qml | 550 ++++ src/gui/SectionHeading.qml | 4 +- src/gui/Settings.qml | 267 +- src/gui/Setup.qml | 557 +--- src/gui/Studio.qml | 30 +- src/gui/VolumeSlider.qml | 122 + src/gui/Web.qml | 10 + src/gui/WebEngine.qml | 121 + src/gui/WebNull.qml | 12 + src/gui/WebSocketTransport.cpp | 95 + src/gui/WebSocketTransport.h | 61 + src/gui/WebView.qml | 23 + src/gui/about.cpp | 6 +- src/gui/about.ui | 2 +- src/gui/ethernet.png | Bin 4922 -> 0 bytes src/gui/ethernet.svg | 3 + src/gui/expand_less.svg | 3 + src/gui/expand_more.svg | 3 + src/gui/externalMic.svg | 1 + src/gui/language.svg | 3 + src/gui/networkCheck.svg | 1 + src/gui/ohno.png | Bin 3200 -> 0 bytes src/gui/qjacktrip.cpp | 35 +- src/gui/qjacktrip.qrc | 29 +- src/gui/sentiment_very_dissatisfied.svg | 3 + src/gui/speed.svg | 4 + src/gui/star.svg | 1 + src/gui/virtualstudio.cpp | 2257 ++++------------- src/gui/virtualstudio.h | 472 +--- src/gui/vs.qml | 172 +- src/gui/vsApi.cpp | 8 + src/gui/vsApi.h | 1 + src/gui/vsAudio.cpp | 1401 ++++++++++ src/gui/vsAudio.h | 447 ++++ src/gui/vsAudioInterface.cpp | 732 ------ src/gui/vsAudioInterface.h | 180 -- src/gui/vsAuth.cpp | 36 +- src/gui/vsAuth.h | 6 +- src/gui/{vsInit.cpp => vsDeeplink.cpp} | 166 +- src/gui/vsDeeplink.h | 116 + src/gui/vsDevice.cpp | 426 ++-- src/gui/vsDevice.h | 49 +- src/gui/vsDeviceCodeFlow.cpp | 2 +- src/gui/vsInit.h | 74 - src/gui/vsServerInfo.cpp | 24 + src/gui/vsServerInfo.h | 1 + src/gui/vsUrlHandler.cpp | 46 - src/gui/vsUrlHandler.h | 58 - src/gui/vsWebSocket.cpp | 79 +- src/gui/vsWebSocket.h | 9 +- src/gui/vsftux.qml | 133 - src/gui/warning.svg | 1 + src/jacktrip_globals.h | 2 +- src/main.cpp | 120 +- subprojects/rtaudio.wrap | 9 +- win/build_installer.bat | 59 +- win/jack.pc | 11 + win/meson.build | 10 + win/{files.wxs => qt5.wxs} | 100 +- win/qt6-noguids.wxs | 1985 +++++++++++++++ win/qt6.wxs | 1966 ++++++++++++++ 149 files changed, 13936 insertions(+), 7665 deletions(-) create mode 100644 docs/VirtualStudio.md create mode 100644 docs/images/jacktrip_virtual_studio.png create mode 100644 externals/Simple-FFT/LICENSE.md create mode 100644 externals/Simple-FFT/README.md create mode 100644 externals/Simple-FFT/include/simple_fft/check_fft.hpp create mode 100644 externals/Simple-FFT/include/simple_fft/copy_array.hpp create mode 100644 externals/Simple-FFT/include/simple_fft/error_handling.hpp create mode 100644 externals/Simple-FFT/include/simple_fft/fft.h create mode 100644 externals/Simple-FFT/include/simple_fft/fft.hpp create mode 100644 externals/Simple-FFT/include/simple_fft/fft_impl.hpp create mode 100644 externals/Simple-FFT/include/simple_fft/fft_settings.h delete mode 100644 linux/flatpak/org.jacktrip.JackTrip.Devel.yml delete mode 100644 linux/flatpak/org.jacktrip.JackTrip.Devel.yml.j2 delete mode 100644 linux/flatpak/org.jacktrip.JackTrip.yml delete mode 100644 linux/qt/1d21c39.diff create mode 100644 macos/meson_native_minversion_10.13.ini create mode 100644 macos/meson_native_minversion_10.14.ini create mode 100644 macos/meson_native_universal.ini create mode 100644 macos/meson_native_universal_10.13.ini create mode 100644 macos/meson_native_universal_10.14.ini delete mode 100644 macos/qt/configure.json.patch create mode 100644 src/gui/AppIcon.qml create mode 100644 src/gui/ChangeDevices.qml create mode 100644 src/gui/DeviceControls.qml create mode 100644 src/gui/DeviceControlsGroup.qml create mode 100644 src/gui/DeviceRefreshButton.qml create mode 100644 src/gui/DeviceWarning.qml create mode 100644 src/gui/FeedbackSurvey.qml create mode 100644 src/gui/Footer.qml create mode 100644 src/gui/InfoTooltip.qml create mode 100644 src/gui/Permissions.qml create mode 100644 src/gui/Recommendations.qml create mode 100644 src/gui/VolumeSlider.qml create mode 100644 src/gui/Web.qml create mode 100644 src/gui/WebEngine.qml create mode 100644 src/gui/WebNull.qml create mode 100644 src/gui/WebSocketTransport.cpp create mode 100644 src/gui/WebSocketTransport.h create mode 100644 src/gui/WebView.qml delete mode 100644 src/gui/ethernet.png create mode 100644 src/gui/ethernet.svg create mode 100644 src/gui/expand_less.svg create mode 100644 src/gui/expand_more.svg create mode 100644 src/gui/externalMic.svg create mode 100644 src/gui/language.svg create mode 100644 src/gui/networkCheck.svg delete mode 100644 src/gui/ohno.png create mode 100644 src/gui/sentiment_very_dissatisfied.svg create mode 100644 src/gui/speed.svg create mode 100644 src/gui/star.svg create mode 100644 src/gui/vsAudio.cpp create mode 100644 src/gui/vsAudio.h delete mode 100644 src/gui/vsAudioInterface.cpp delete mode 100644 src/gui/vsAudioInterface.h rename src/gui/{vsInit.cpp => vsDeeplink.cpp} (63%) create mode 100644 src/gui/vsDeeplink.h delete mode 100644 src/gui/vsInit.h delete mode 100644 src/gui/vsUrlHandler.cpp delete mode 100644 src/gui/vsUrlHandler.h delete mode 100644 src/gui/vsftux.qml create mode 100644 src/gui/warning.svg create mode 100644 win/jack.pc rename win/{files.wxs => qt5.wxs} (95%) create mode 100644 win/qt6-noguids.wxs create mode 100644 win/qt6.wxs diff --git a/CMakeLists.txt b/CMakeLists.txt index e0d803f..a4e80a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,14 +188,13 @@ if (NOT nogui) src/gui/vsApi.cpp src/gui/vsAuth.cpp src/gui/vsDeviceCodeFlow.cpp - src/gui/vsInit.cpp + src/gui/vsDeeplink.cpp src/gui/vsQuickView.cpp src/gui/vsServerInfo.cpp src/gui/vsPing.cpp src/gui/vsPinger.cpp src/gui/vsDevice.cpp - src/gui/vsAudioInterface.cpp - src/gui/vsUrlHandler.cpp + src/gui/vsAudio.cpp src/gui/vsWebSocket.cpp src/gui/vsPermissions.cpp src/gui/qjacktrip.qrc diff --git a/LICENSE.md b/LICENSE.md index 517bd08..39b5c1f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,14 @@ # JackTrip License -Copyright © 2020 Juan-Pablo Caceres, Chris Chafe. -SoundWIRE group at CCRMA, Stanford University. -Graphical user interface originally released as QJackTrip, +Copyright © 2008-2020 Juan-Pablo Caceres, Chris Chafe. +SoundWIRE group at CCRMA, Stanford University. + +Classic mode graphical user interface originally released as QJackTrip, Copyright © 2020 Aaron Wyatt +Virtual Studio interface and integration +Copyright © 2022-2023 JackTrip Labs, Inc. + JackTrip project consists of files under MIT and GPL licenses, indicated in the header of individual files. Early versions of JackTrip were licensed under MIT. diff --git a/build b/build index 0e9c128..351873e 100755 --- a/build +++ b/build @@ -112,10 +112,10 @@ if [[ $platform == 'linux' ]]; then echo "Using qmake-qt5" QCMD=qmake-qt5 elif hash qmake 2>/dev/null; then #in case qt was compiled by user - echo "Using qmake" - QCMD=qmake -fi -MCMD=make + echo "Using qmake" + QCMD=qmake + fi + MCMD=make elif [[ $platform == 'macosx' ]]; then QCMD=qmake # if qmake is not in path, try homebrew qt5 @@ -145,6 +145,15 @@ fi QSPEC=`$QCMD -query | grep QMAKE_SPEC` QSPEC=${QSPEC##QMAKE_SPEC:} +# check spec for windows to update make command +if [[ $QSPEC == "win32-msvc" ]]; then + MCMD=nmake + JOM=$(which jom.exe) + if [[ "x$JOM" != "x" ]]; then + MCMD=$JOM + fi +fi + # check for RtAudio if [[ $RTAUDIO == 1 ]]; then pkg-config --exists rtaudio 2> /dev/null @@ -183,7 +192,11 @@ $QCMD -spec $QSPEC $CONFIG "${UNKNOWN_OPTIONS[@]}" $PRO_FILE if [[ $clean == 1 ]]; then $MCMD clean fi -$MCMD -j$jobs release +if [[ "$MCMD" == "nmake" ]]; then + $MCMD release +else + $MCMD -j$jobs release +fi if [[ "$install" == 1 ]]; then echo "*** Installing JackTrip ***" echo "We need elevated privileges to install JackTrip in the system location" diff --git a/build-aux/flatpak/org.jacktrip.JackTrip.json b/build-aux/flatpak/org.jacktrip.JackTrip.json index 11ceb92..bfbfef0 100644 --- a/build-aux/flatpak/org.jacktrip.JackTrip.json +++ b/build-aux/flatpak/org.jacktrip.JackTrip.json @@ -1,16 +1,20 @@ { "app-id": "org.jacktrip.JackTrip", "runtime": "org.kde.Platform", - "runtime-version": "5.15-22.08", + "runtime-version": "6.4", "sdk": "org.kde.Sdk", + "base": "io.qt.qtwebengine.BaseApp", + "base-version": "6.4", "command": "jacktrip", "finish-args": [ "--share=ipc", - "--socket=x11", + "--socket=wayland", + "--socket=fallback-x11", "--device=dri", "--share=network", "--filesystem=xdg-run/pipewire-0", - "--env=PIPEWIRE_LATENCY=256/48000", + "--env=PIPEWIRE_LATENCY=128/48000", + "--env=QML_IMPORT_PATH=/app/qml", "--env=QT_QUICK_CONTROLS_STYLE=universal" ], "cleanup": [ @@ -23,15 +27,15 @@ "name": "jacktrip", "buildsystem": "meson", "config-opts": [ - "-Dbuildtype=debugoptimized" + "-Dbuildtype=debugoptimized", + "-Dpkg_config_path=/app/lib/x86_64-linux-gnu/pkgconfig" ], "sources": [ { - "type": "git", - "disable-submodules": true, - "url": "https://github.com/jacktrip/jacktrip/" + "type": "dir", + "path": "../../" } ] } ] -} \ No newline at end of file +} diff --git a/docs/Build/Linux.md b/docs/Build/Linux.md index c8d3af8..4b56d37 100644 --- a/docs/Build/Linux.md +++ b/docs/Build/Linux.md @@ -7,28 +7,45 @@ directory of the project. ## Dependencies - C++ compiler -- Qt5 +- Meson +- Qt5, or Qt6 (required for Virtual Studio) Optional: -- JACK (preferred) or RtAudio (not fully functional) +- JACK (preferred) or RtAudio (for clients only) - help2man for generating the manpage -### Fedora +### Fedora (Qt5) ```sh dnf install qt5-qtbase-devel qt5-qtnetworkauth-devel qt5-qtwebsockets-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel dnf groupinstall "C Development Tools and Libraries" dnf groupinstall "Development Tools" -dnf install "pkgconfig(jack)" rtaudio-devel git help2man +dnf install "pkgconfig(jack)" rtaudio-devel git help2man python3-jinja2 +``` + +### Fedora (Qt6) +```sh +dnf install qt6-qtbase-devel qt5-qtnetworkauth-devel qt5-qtwebsockets-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel qt6-qtwebengine-devel qt6-qtwebchannel-devel qt6-qt5compat-devel +dnf groupinstall "C Development Tools and Libraries" +dnf groupinstall "Development Tools" +dnf install "pkgconfig(jack)" rtaudio-devel git help2man python3-jinja2 ``` Clone the git repo with submodules and run `./build install` in the project directory or use QtCreator to compile. -### Ubuntu and Debian/Raspbian +### Ubuntu and Debian/Raspbian (Qt5) +```sh +apt install --no-install-recommends build-essential autoconf automake libtool make libjack-jackd2-dev git help2man python3-jinja2 +apt install qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qttools5-dev libqt5svg5-dev libqt5websockets5-dev qtdeclarative5-dev qtquickcontrols2-5-dev +``` + +### Ubuntu and Debian/Raspbian (Qt6) ```sh -apt install --no-install-recommends build-essential autoconf automake libtool make libjack-jackd2-dev git help2man -apt install qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qttools5-dev libqt5svg5-dev libqt5networkauth5-dev libqt5websockets5-dev qtdeclarative5-dev qtquickcontrols2-5-dev +apt install --no-install-recommends build-essential autoconf automake libtool make libjack-jackd2-dev git help2man libclang-dev libdbus-1-dev libdbus-1-dev python3-jinja2 +apt install qt6-base-dev qt6-base-dev-tools qmake6 qt6-tools-dev qt6-declarative-dev qt6-webengine-dev qt6-webview-dev qt6-webview-plugins libqt6svg6-dev libqt6websockets6-dev libgl1-mesa-dev +# for GUI builds +apt install libfreetype6-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libdrm-dev libglu1-mesa-dev libwayland-dev libwayland-egl1-mesa libgles2-mesa-dev libwayland-server0 libwayland-egl-backend-dev libxcb1-dev libxext-dev libfontconfig1-dev libxrender-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev '^libxcb.*-dev' libxcb-render-util0-dev libxcomposite-dev libgtk-3-dev apt install librtaudio-dev # if building with RtAudio ``` @@ -37,9 +54,7 @@ directory or use QtCreator to compile. ### Building and Installation instructions -For other Linux distributions, install the dependencies listed above. Clone the -git repo and run `./build install` (or `./build` to skip installation) in the -project directory, or use QtCreator to compile. +For other Linux distributions, install the dependencies listed above. To clone the repo in the Terminal: ```sh @@ -52,65 +67,59 @@ Next, navigate to the cloned repository: $ cd jacktrip ``` -JackTrip provides a build script designed to simplify the build process and -providing a number of options. To list them, run: -```sh -$ ./build -h -``` -This should print: -```sh -usage: - ./build [noclean nojack rtaudio nogui static install [-config static]] +JackTrip uses meson. To configure a build directory, use `meson setup` with +the following parameters: - options: - noclean - do not run "make clean" first - nojack - build without jack - rtaudio - build with rtaudio - nogui - build without the gui - static - build with static libraries - weakjack - build with weak linking of jack libraries - install - install jacktrip in system location (uses sudo) -``` +* `rtaudio`: Enabled this to build with support for the RtAudio backend. + If an existing installation is found, it will be used. Otherwise, meson + uses a subproject to download and install the latest supported release. + JackTrip supports both RtAudio v5 and v6. -To just compile JackTrip using the build script, run: -```sh -$ ./build -$ cd builddir -$ ls -``` +* `jack`: Enable this to link directly with libraries for the Jack Audio + Toolkit. JackTrip will fail if these cannot be found at runtime. -You should see a `jacktrip` in this folder. +* `weakjack`: Enable this to build with support for the Jack Audio Toolkit, + with support for dynamically loading the libraries at runtime. JackTrip + will still work if they cannot be found. This requires `rtaudio` and + uses a git submodule. -To compile **and install** using the build script, run: -```sh -$ ./build install -# enter your password when prompted -``` +* `nogui`: Build without support for a graphical user interface (this + also disables support for Virtual Studio). Only basic command line + features will be included. This requires fewer dependencies, and + supports static builds. -If the build script doesn't work, try running qmake directly. You'd need to have -qmake in your `$PATH`. Then you can build with: +* `novs`: Build without support for Virtual Studio. Virtual Studio + requires Qt6 with the WebEngine and WebChannel libraries installed. -```sh -$ mkdir builddir -$ cd builddir -$ qmake ../jacktrip.pro -$ make release -$ sudo make release-install # to install JackTrip system-wide -``` +* `vsftux`: Skip the "Yes" / "No" first time run screen asking users if + they would like to use the Virtual Studio interface. Classic mode can + still be selected at startup, and can be used at any time. + +* `noupdater`: Build without support for automatic updates. This is + implied and has no effect when building for Linux. + +* `nofeedback`: Build without support for feedback detection. This + feature is optional, and uses the SimpleFFT third party library. -You can pass configuration options to qmake with `-config