From 3be0c39ff9c971e9915d17287bfb6e70f1a8ace0 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Tue, 8 Mar 2022 12:22:24 +0100 Subject: [PATCH 1/4] Android: Build with C++17 support in preparation for oboe 1.6.1 update liboboe 1.6.1 (and maybe earlier versions) requires C++17 for std::timed_mutex --- Jamulus.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 754d494f01..2b95a56d55 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -210,8 +210,8 @@ win32 { ANDROID_VERSION_CODE = $$system(git log --oneline | wc -l) message("Setting ANDROID_VERSION_NAME=$${ANDROID_VERSION_NAME} ANDROID_VERSION_CODE=$${ANDROID_VERSION_CODE}") - # we want to compile with C++14 - CONFIG += c++14 + # liboboe requires C++17 for std::timed_mutex + CONFIG += c++17 QT += androidextras From bd9bf54f595df4e2b74dc1392aa2d86a1184c6f4 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Tue, 8 Mar 2022 14:03:46 +0100 Subject: [PATCH 2/4] Android: Detect liboboe sources automatically Instead of hardcoding the list of relevant .cpp and .h files, use qmake's $$files to detect the sources. This makes liboboe updates easier and makes Jamulus.pro more readable. It has been confirmed that the hardcoded list of .cpp and .h files closely matches the list of available files. In other words, this commit does not change the content of the variables a lot, it just switches from hardcoding to dynamic detection. The new approach adds a single new .h file which was not listed previously: libs/oboe/src/flowgraph/resampler/KaiserWindow.h --- Jamulus.pro | 103 +--------------------------------------------------- 1 file changed, 2 insertions(+), 101 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 2b95a56d55..33d3dfb940 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -232,107 +232,8 @@ win32 { # if compiling for android you need to use Oboe library which is included as a git submodule # make sure you git pull with submodules to pull the latest Oboe library - OBOE_SOURCES = libs/oboe/src/aaudio/AAudioLoader.cpp \ - libs/oboe/src/aaudio/AudioStreamAAudio.cpp \ - libs/oboe/src/common/AudioSourceCaller.cpp \ - libs/oboe/src/common/AudioStream.cpp \ - libs/oboe/src/common/AudioStreamBuilder.cpp \ - libs/oboe/src/common/DataConversionFlowGraph.cpp \ - libs/oboe/src/common/FilterAudioStream.cpp \ - libs/oboe/src/common/FixedBlockAdapter.cpp \ - libs/oboe/src/common/FixedBlockReader.cpp \ - libs/oboe/src/common/FixedBlockWriter.cpp \ - libs/oboe/src/common/LatencyTuner.cpp \ - libs/oboe/src/common/QuirksManager.cpp \ - libs/oboe/src/common/SourceFloatCaller.cpp \ - libs/oboe/src/common/SourceI16Caller.cpp \ - libs/oboe/src/common/StabilizedCallback.cpp \ - libs/oboe/src/common/Trace.cpp \ - libs/oboe/src/common/Utilities.cpp \ - libs/oboe/src/common/Version.cpp \ - libs/oboe/src/fifo/FifoBuffer.cpp \ - libs/oboe/src/fifo/FifoController.cpp \ - libs/oboe/src/fifo/FifoControllerBase.cpp \ - libs/oboe/src/fifo/FifoControllerIndirect.cpp \ - libs/oboe/src/flowgraph/ChannelCountConverter.cpp \ - libs/oboe/src/flowgraph/ClipToRange.cpp \ - libs/oboe/src/flowgraph/FlowGraphNode.cpp \ - libs/oboe/src/flowgraph/ManyToMultiConverter.cpp \ - libs/oboe/src/flowgraph/MonoToMultiConverter.cpp \ - libs/oboe/src/flowgraph/MultiToMonoConverter.cpp \ - libs/oboe/src/flowgraph/RampLinear.cpp \ - libs/oboe/src/flowgraph/SampleRateConverter.cpp \ - libs/oboe/src/flowgraph/SinkFloat.cpp \ - libs/oboe/src/flowgraph/SinkI16.cpp \ - libs/oboe/src/flowgraph/SinkI24.cpp \ - libs/oboe/src/flowgraph/SourceFloat.cpp \ - libs/oboe/src/flowgraph/SourceI16.cpp \ - libs/oboe/src/flowgraph/SourceI24.cpp \ - libs/oboe/src/flowgraph/resampler/IntegerRatio.cpp \ - libs/oboe/src/flowgraph/resampler/LinearResampler.cpp \ - libs/oboe/src/flowgraph/resampler/MultiChannelResampler.cpp \ - libs/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp \ - libs/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.cpp \ - libs/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp \ - libs/oboe/src/flowgraph/resampler/SincResampler.cpp \ - libs/oboe/src/flowgraph/resampler/SincResamplerStereo.cpp \ - libs/oboe/src/opensles/AudioInputStreamOpenSLES.cpp \ - libs/oboe/src/opensles/AudioOutputStreamOpenSLES.cpp \ - libs/oboe/src/opensles/AudioStreamBuffered.cpp \ - libs/oboe/src/opensles/AudioStreamOpenSLES.cpp \ - libs/oboe/src/opensles/EngineOpenSLES.cpp \ - libs/oboe/src/opensles/OpenSLESUtilities.cpp \ - libs/oboe/src/opensles/OutputMixerOpenSLES.cpp - - OBOE_HEADERS = libs/oboe/src/aaudio/AAudioLoader.h \ - libs/oboe/src/aaudio/AudioStreamAAudio.h \ - libs/oboe/src/common/AudioClock.h \ - libs/oboe/src/common/AudioSourceCaller.h \ - libs/oboe/src/common/DataConversionFlowGraph.h \ - libs/oboe/src/common/FilterAudioStream.h \ - libs/oboe/src/common/FixedBlockAdapter.h \ - libs/oboe/src/common/FixedBlockReader.h \ - libs/oboe/src/common/FixedBlockWriter.h \ - libs/oboe/src/common/MonotonicCounter.h \ - libs/oboe/src/common/OboeDebug.h \ - libs/oboe/src/common/QuirksManager.h \ - libs/oboe/src/common/SourceFloatCaller.h \ - libs/oboe/src/common/SourceI16Caller.h \ - libs/oboe/src/common/Trace.h \ - libs/oboe/src/fifo/FifoBuffer.h \ - libs/oboe/src/fifo/FifoController.h \ - libs/oboe/src/fifo/FifoControllerBase.h \ - libs/oboe/src/fifo/FifoControllerIndirect.h \ - libs/oboe/src/flowgraph/ChannelCountConverter.h \ - libs/oboe/src/flowgraph/ClipToRange.h \ - libs/oboe/src/flowgraph/FlowGraphNode.h \ - libs/oboe/src/flowgraph/ManyToMultiConverter.h \ - libs/oboe/src/flowgraph/MonoToMultiConverter.h \ - libs/oboe/src/flowgraph/MultiToMonoConverter.h \ - libs/oboe/src/flowgraph/RampLinear.h \ - libs/oboe/src/flowgraph/SampleRateConverter.h \ - libs/oboe/src/flowgraph/SinkFloat.h \ - libs/oboe/src/flowgraph/SinkI16.h \ - libs/oboe/src/flowgraph/SinkI24.h \ - libs/oboe/src/flowgraph/SourceFloat.h \ - libs/oboe/src/flowgraph/SourceI16.h \ - libs/oboe/src/flowgraph/SourceI24.h \ - libs/oboe/src/flowgraph/resampler/HyperbolicCosineWindow.h \ - libs/oboe/src/flowgraph/resampler/IntegerRatio.h \ - libs/oboe/src/flowgraph/resampler/LinearResampler.h \ - libs/oboe/src/flowgraph/resampler/MultiChannelResampler.h \ - libs/oboe/src/flowgraph/resampler/PolyphaseResampler.h \ - libs/oboe/src/flowgraph/resampler/PolyphaseResamplerMono.h \ - libs/oboe/src/flowgraph/resampler/PolyphaseResamplerStereo.h \ - libs/oboe/src/flowgraph/resampler/SincResampler.h \ - libs/oboe/src/flowgraph/resampler/SincResamplerStereo.h \ - libs/oboe/src/opensles/AudioInputStreamOpenSLES.h \ - libs/oboe/src/opensles/AudioOutputStreamOpenSLES.h \ - libs/oboe/src/opensles/AudioStreamBuffered.h \ - libs/oboe/src/opensles/AudioStreamOpenSLES.h \ - libs/oboe/src/opensles/EngineOpenSLES.h \ - libs/oboe/src/opensles/OpenSLESUtilities.h \ - libs/oboe/src/opensles/OutputMixerOpenSLES.h + OBOE_SOURCES = $$files(libs/oboe/src/*.cpp, true) + OBOE_HEADERS = $$files(libs/oboe/src/*.h, true) INCLUDEPATH_OBOE = libs/oboe/include/ \ libs/oboe/src/ From 08215ae5b0fd055d7c607f7549501055184707f3 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Tue, 8 Mar 2022 12:03:37 +0100 Subject: [PATCH 3/4] Android: Update liboboe to 1.6.1 This updates the included git submodule from a 01/2021 manual commit to the latest stable version. We should aim to use the latest supported version. There are also unresolved CodeQL warnings about our current liboboe tree. --- Jamulus.pro | 2 +- libs/oboe | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 33d3dfb940..9ea799cf3b 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -226,7 +226,7 @@ win32 { SOURCES += android/sound.cpp \ android/androiddebug.cpp - LIBS += -lOpenSLES + LIBS += -lOpenSLES -loboe ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android DISTFILES += android/AndroidManifest.xml diff --git a/libs/oboe b/libs/oboe index 6c6bff4c5a..855ea841a9 160000 --- a/libs/oboe +++ b/libs/oboe @@ -1 +1 @@ -Subproject commit 6c6bff4c5a67b5da3067dc8b1480c2e310d81a2e +Subproject commit 855ea841a93bf304065e5152909983b1b85ffabb From 8ba96f20d7e68c94d1955f8a4e00796f7556de9a Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Tue, 8 Mar 2022 13:52:36 +0100 Subject: [PATCH 4/4] Jamulus.pro: Fix wrong indentation in Android block --- Jamulus.pro | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 9ea799cf3b..6d895727b9 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -226,7 +226,7 @@ win32 { SOURCES += android/sound.cpp \ android/androiddebug.cpp - LIBS += -lOpenSLES -loboe + LIBS += -lOpenSLES ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android DISTFILES += android/AndroidManifest.xml @@ -243,10 +243,10 @@ win32 { libs/oboe/LICENSE \ libs/oboe/README - INCLUDEPATH += $$INCLUDEPATH_OBOE - HEADERS += $$OBOE_HEADERS - SOURCES += $$OBOE_SOURCES - DISTFILES += $$DISTFILES_OBOE + INCLUDEPATH += $$INCLUDEPATH_OBOE + HEADERS += $$OBOE_HEADERS + SOURCES += $$OBOE_SOURCES + DISTFILES += $$DISTFILES_OBOE } else:unix { # we want to compile with C++11 CONFIG += c++11