Merge remote-tracking branch 'aosp/upstream-main' into external/oboe
This will reduce build warnings.
Bug: 329456999
Test: mmm external/oboe
Test: mmma cts/apps/CtsVerifier
Test: mmm frameworks/av/media/libaaudio
Change-Id: I5c1e62db88f92af607851c86172d23e30a0d4daa
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
new file mode 100644
index 0000000..078c1cf
--- /dev/null
+++ b/.github/workflows/android.yml
@@ -0,0 +1,37 @@
+name: Build CI
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: build samples
+ run: |
+ pushd samples
+ chmod +x gradlew
+ ./gradlew -q clean bundleDebug
+ popd
+ - name: build OboeTester
+ run: |
+ pushd apps/OboeTester
+ chmod +x gradlew
+ ./gradlew -q clean bundleDebug
+ popd
+ - name: build fxlab
+ run: |
+ pushd apps/fxlab
+ chmod +x gradlew
+ ./gradlew -q clean bundleDebug
+ popd
+
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..c3d2e74
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,146 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package {
+ default_applicable_licenses: ["external_oboe_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+// See: http://go/android-license-faq
+license {
+ name: "external_oboe_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-GPL-2.0",
+ "SPDX-license-identifier-MIT",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_library_static {
+ name: "oboe",
+ srcs: [
+ "src/aaudio/AAudioLoader.cpp",
+ "src/common/AdpfWrapper.cpp",
+ "src/aaudio/AudioStreamAAudio.cpp",
+ "src/common/AudioSourceCaller.cpp",
+ "src/common/AudioStream.cpp",
+ "src/common/AudioStreamBuilder.cpp",
+ "src/common/DataConversionFlowGraph.cpp",
+ "src/common/FilterAudioStream.cpp",
+ "src/common/FixedBlockAdapter.cpp",
+ "src/common/FixedBlockReader.cpp",
+ "src/common/FixedBlockWriter.cpp",
+ "src/common/LatencyTuner.cpp",
+ "src/common/OboeExtensions.cpp",
+ "src/common/SourceFloatCaller.cpp",
+ "src/common/SourceI16Caller.cpp",
+ "src/common/SourceI24Caller.cpp",
+ "src/common/SourceI32Caller.cpp",
+ "src/common/Utilities.cpp",
+ "src/common/QuirksManager.cpp",
+ "src/fifo/FifoBuffer.cpp",
+ "src/fifo/FifoController.cpp",
+ "src/fifo/FifoControllerBase.cpp",
+ "src/fifo/FifoControllerIndirect.cpp",
+ "src/flowgraph/FlowGraphNode.cpp",
+ "src/flowgraph/ChannelCountConverter.cpp",
+ "src/flowgraph/ClipToRange.cpp",
+ "src/flowgraph/Limiter.cpp",
+ "src/flowgraph/ManyToMultiConverter.cpp",
+ "src/flowgraph/MonoBlend.cpp",
+ "src/flowgraph/MonoToMultiConverter.cpp",
+ "src/flowgraph/MultiToManyConverter.cpp",
+ "src/flowgraph/MultiToMonoConverter.cpp",
+ "src/flowgraph/RampLinear.cpp",
+ "src/flowgraph/SampleRateConverter.cpp",
+ "src/flowgraph/SinkFloat.cpp",
+ "src/flowgraph/SinkI16.cpp",
+ "src/flowgraph/SinkI24.cpp",
+ "src/flowgraph/SinkI32.cpp",
+ "src/flowgraph/SinkI8_24.cpp",
+ "src/flowgraph/SourceFloat.cpp",
+ "src/flowgraph/SourceI16.cpp",
+ "src/flowgraph/SourceI24.cpp",
+ "src/flowgraph/SourceI32.cpp",
+ "src/flowgraph/SourceI8_24.cpp",
+ "src/flowgraph/resampler/IntegerRatio.cpp",
+ "src/flowgraph/resampler/LinearResampler.cpp",
+ "src/flowgraph/resampler/MultiChannelResampler.cpp",
+ "src/flowgraph/resampler/PolyphaseResampler.cpp",
+ "src/flowgraph/resampler/PolyphaseResamplerMono.cpp",
+ "src/flowgraph/resampler/PolyphaseResamplerStereo.cpp",
+ "src/flowgraph/resampler/SincResampler.cpp",
+ "src/flowgraph/resampler/SincResamplerStereo.cpp",
+ "src/opensles/AudioInputStreamOpenSLES.cpp",
+ "src/opensles/AudioOutputStreamOpenSLES.cpp",
+ "src/opensles/AudioStreamBuffered.cpp",
+ "src/opensles/AudioStreamOpenSLES.cpp",
+ "src/opensles/EngineOpenSLES.cpp",
+ "src/opensles/OpenSLESUtilities.cpp",
+ "src/opensles/OutputMixerOpenSLES.cpp",
+ "src/common/StabilizedCallback.cpp",
+ "src/common/Trace.cpp",
+ "src/common/Version.cpp",
+ ],
+ header_libs: ["jni_headers"],
+ include_dirs: [
+ "external/oboe/include",
+ "external/oboe/src",
+ "frameworks/wilhelm/include",
+ "frameworks/av/media/libaaudio/include",
+ ],
+ cflags: [
+ "-std=c++14",
+ "-Wall",
+ "-Wextra-semi",
+ "-Wshadow",
+ "-Wshadow-field",
+ "-Wno-unused-parameter",
+ "-Wno-deprecated-declarations",
+ "-Ofast",
+ "-DFLOWGRAPH_ANDROID_INTERNAL=0",
+ "-DFLOWGRAPH_OUTER_NAMESPACE=oboe",
+ "-DRESAMPLER_OUTER_NAMESPACE=oboe",
+ ],
+ sdk_version: "current",
+ stl: "libc++_static",
+}
+
+cc_library_headers {
+ name: "oboe_headers",
+ export_include_dirs: ["include"],
+}
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..072f463
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,14 @@
+name: "Oboe"
+description: "Native audio API for Android that calls AAudio or OpenSL ES."
+third_party {
+ url {
+ type: GIT
+ value: "https://github.com/google/oboe"
+ }
+ version: "1.7.0"
+ last_upgrade_date {
+ year: 2022
+ month: 12
+ day: 14
+ }
+}
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..f4d51f9
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1 @@
+philburk@google.com
diff --git a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp
index 69c348f..2aa6eeb 100644
--- a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp
+++ b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp
@@ -26,6 +26,7 @@
#include <thread>
#endif // DEBUG_CLOSE_RACE
#include <vector>
+#include <common/AudioClock.h>
#include <common/AudioClock.h>
#include "util/WaveFileWriter.h"
diff --git a/apps/OboeTester/app/src/main/res/layout/activity_main.xml b/apps/OboeTester/app/src/main/res/layout/activity_main.xml
index 8f49360..a40a91c 100644
--- a/apps/OboeTester/app/src/main/res/layout/activity_main.xml
+++ b/apps/OboeTester/app/src/main/res/layout/activity_main.xml
@@ -147,6 +147,15 @@
android:onClick="onLaunchExtratests"
android:text="Extras..." />
+ <Button
+ android:id="@+id/button_test_data_paths"
+ android:layout_gravity="fill"
+ android:layout_width="0dp"
+ android:layout_columnWeight="1"
+ android:layout_height="wrap_content"
+ android:onClick="onLaunchTestDataPaths"
+ android:text="Data Paths" />
+
</GridLayout>