xref: /aosp_15_r20/external/oboe/Android.bp (revision 05767d913155b055644481607e6fa1e35e2fe72c)
1//
2// Copyright (C) 2020 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_applicable_licenses: ["external_oboe_license"],
19}
20
21// Added automatically by a large-scale-change that took the approach of
22// 'apply every license found to every target'. While this makes sure we respect
23// every license restriction, it may not be entirely correct.
24//
25// e.g. GPL in an MIT project might only apply to the contrib/ directory.
26//
27// Please consider splitting the single license below into multiple licenses,
28// taking care not to lose any license_kind information, and overriding the
29// default license using the 'licenses: [...]' property on targets as needed.
30//
31// For unused files, consider creating a 'fileGroup' with "//visibility:private"
32// to attach the license to, and including a comment whether the files may be
33// used in the current project.
34//
35// large-scale-change included anything that looked like it might be a license
36// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
37//
38// Please consider removing redundant or irrelevant files from 'license_text:'.
39// See: http://go/android-license-faq
40license {
41    name: "external_oboe_license",
42    visibility: [":__subpackages__"],
43    license_kinds: [
44        "SPDX-license-identifier-Apache-2.0",
45        "SPDX-license-identifier-GPL-2.0",
46        "SPDX-license-identifier-MIT",
47    ],
48    license_text: [
49        "LICENSE",
50    ],
51}
52
53cc_library_static {
54    name: "oboe",
55    srcs: [
56        "src/aaudio/AAudioLoader.cpp",
57        "src/common/AdpfWrapper.cpp",
58        "src/aaudio/AudioStreamAAudio.cpp",
59        "src/common/AudioSourceCaller.cpp",
60        "src/common/AudioStream.cpp",
61        "src/common/AudioStreamBuilder.cpp",
62        "src/common/DataConversionFlowGraph.cpp",
63        "src/common/FilterAudioStream.cpp",
64        "src/common/FixedBlockAdapter.cpp",
65        "src/common/FixedBlockReader.cpp",
66        "src/common/FixedBlockWriter.cpp",
67        "src/common/LatencyTuner.cpp",
68        "src/common/OboeExtensions.cpp",
69        "src/common/SourceFloatCaller.cpp",
70        "src/common/SourceI16Caller.cpp",
71        "src/common/SourceI24Caller.cpp",
72        "src/common/SourceI32Caller.cpp",
73        "src/common/Utilities.cpp",
74        "src/common/QuirksManager.cpp",
75        "src/fifo/FifoBuffer.cpp",
76        "src/fifo/FifoController.cpp",
77        "src/fifo/FifoControllerBase.cpp",
78        "src/fifo/FifoControllerIndirect.cpp",
79        "src/flowgraph/FlowGraphNode.cpp",
80        "src/flowgraph/ChannelCountConverter.cpp",
81        "src/flowgraph/ClipToRange.cpp",
82        "src/flowgraph/Limiter.cpp",
83        "src/flowgraph/ManyToMultiConverter.cpp",
84        "src/flowgraph/MonoBlend.cpp",
85        "src/flowgraph/MonoToMultiConverter.cpp",
86        "src/flowgraph/MultiToManyConverter.cpp",
87        "src/flowgraph/MultiToMonoConverter.cpp",
88        "src/flowgraph/RampLinear.cpp",
89        "src/flowgraph/SampleRateConverter.cpp",
90        "src/flowgraph/SinkFloat.cpp",
91        "src/flowgraph/SinkI16.cpp",
92        "src/flowgraph/SinkI24.cpp",
93        "src/flowgraph/SinkI32.cpp",
94        "src/flowgraph/SinkI8_24.cpp",
95        "src/flowgraph/SourceFloat.cpp",
96        "src/flowgraph/SourceI16.cpp",
97        "src/flowgraph/SourceI24.cpp",
98        "src/flowgraph/SourceI32.cpp",
99        "src/flowgraph/SourceI8_24.cpp",
100        "src/flowgraph/resampler/IntegerRatio.cpp",
101        "src/flowgraph/resampler/LinearResampler.cpp",
102        "src/flowgraph/resampler/MultiChannelResampler.cpp",
103        "src/flowgraph/resampler/PolyphaseResampler.cpp",
104        "src/flowgraph/resampler/PolyphaseResamplerMono.cpp",
105        "src/flowgraph/resampler/PolyphaseResamplerStereo.cpp",
106        "src/flowgraph/resampler/SincResampler.cpp",
107        "src/flowgraph/resampler/SincResamplerStereo.cpp",
108        "src/opensles/AudioInputStreamOpenSLES.cpp",
109        "src/opensles/AudioOutputStreamOpenSLES.cpp",
110        "src/opensles/AudioStreamBuffered.cpp",
111        "src/opensles/AudioStreamOpenSLES.cpp",
112        "src/opensles/EngineOpenSLES.cpp",
113        "src/opensles/OpenSLESUtilities.cpp",
114        "src/opensles/OutputMixerOpenSLES.cpp",
115        "src/common/StabilizedCallback.cpp",
116        "src/common/Trace.cpp",
117        "src/common/Version.cpp",
118    ],
119    header_libs: ["jni_headers"],
120    include_dirs: [
121        "external/oboe/include",
122        "external/oboe/src",
123        "frameworks/wilhelm/include",
124        "frameworks/av/media/libaaudio/include",
125    ],
126    cflags: [
127        "-std=c++14",
128        "-Wall",
129        "-Wextra-semi",
130        "-Wshadow",
131        "-Wshadow-field",
132        "-Wno-unused-parameter",
133        "-Wno-deprecated-declarations",
134        "-Ofast",
135        "-DFLOWGRAPH_ANDROID_INTERNAL=0",
136        "-DFLOWGRAPH_OUTER_NAMESPACE=oboe",
137        "-DRESAMPLER_OUTER_NAMESPACE=oboe",
138    ],
139    sdk_version: "current",
140    stl: "libc++_static",
141}
142
143cc_library_headers {
144    name: "oboe_headers",
145    export_include_dirs: ["include"],
146}
147