blob: 47cbbb1c06d353ddf9a826bd935e13476c9558a8 [file] [log] [blame]
Bob Badour56786ac2021-02-25 15:24:36 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_av_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_av_license"],
8}
9
Dan Willemsenb44c69e2017-10-23 17:15:03 -070010cc_library {
11 name: "libaaudio",
12
13 local_include_dirs: [
14 "binding",
15 "client",
16 "core",
17 "fifo",
Phil Burk64dce362018-03-28 15:30:39 -070018 "flowgraph",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070019 "legacy",
20 "utility",
21 ],
Marco Nelissen6b285942019-10-21 14:52:30 -070022 header_libs: [
23 "libaaudio_headers",
24 ],
Dan Willemsenb44c69e2017-10-23 17:15:03 -070025 export_header_lib_headers: ["libaaudio_headers"],
dimitry8e8a9682019-06-04 15:14:02 +020026 version_script: "libaaudio.map.txt",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070027
28 srcs: [
dimitryd81a84a2019-07-17 13:55:16 +020029 "core/AAudioAudio.cpp",
30 ],
31
32 cflags: [
Phil Burk0bd745e2020-10-17 18:20:01 +000033 "-Wthread-safety",
dimitryd81a84a2019-07-17 13:55:16 +020034 "-Wno-unused-parameter",
35 "-Wall",
36 "-Werror",
37
38 // By default, all symbols are hidden.
39 // "-fvisibility=hidden",
40 // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
41 "-DAAUDIO_API=__attribute__((visibility(\"default\")))",
42 ],
43
44 shared_libs: [
45 "libaaudio_internal",
46 "libaudioclient",
47 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070048 "libmedia_helper",
49 "libmediametrics",
50 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020051 "liblog",
52 "libcutils",
53 "libutils",
54 "libbinder",
55 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -070056
57 sanitize: {
58 integer_overflow: true,
59 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -070060 },
61
Zach Johnson99c47ff2019-12-02 15:28:34 -080062 stubs: {
63 symbol_file: "libaaudio.map.txt",
64 versions: ["28"],
65 },
dimitryd81a84a2019-07-17 13:55:16 +020066}
67
68cc_library {
69 name: "libaaudio_internal",
70
71 local_include_dirs: [
72 "binding",
73 "client",
74 "core",
75 "fifo",
76 "legacy",
77 "utility",
78 ],
79
80 export_include_dirs: ["."],
Marco Nelissen6b285942019-10-21 14:52:30 -070081 header_libs: [
82 "libaaudio_headers",
Cindy Zhou30ed5942019-10-30 13:24:37 -070083 "libmedia_headers",
Marco Nelissen7c96ea72020-01-10 15:46:22 -080084 "libmediametrics_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -070085 ],
dimitryd81a84a2019-07-17 13:55:16 +020086 export_header_lib_headers: ["libaaudio_headers"],
87
88 shared_libs: [
89 "libaudioclient",
90 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070091 "libmedia_helper",
92 "libmediametrics",
93 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020094 "liblog",
95 "libcutils",
96 "libutils",
97 "libbinder",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -070098 "aaudio-aidl-cpp",
dimitryd81a84a2019-07-17 13:55:16 +020099 ],
100
101 cflags: [
102 "-Wno-unused-parameter",
103 "-Wall",
104 "-Werror",
105 ],
106
107 srcs: [
108 "core/AudioGlobal.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700109 "core/AudioStream.cpp",
110 "core/AudioStreamBuilder.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700111 "core/AAudioStreamParameters.cpp",
112 "legacy/AudioStreamLegacy.cpp",
113 "legacy/AudioStreamRecord.cpp",
114 "legacy/AudioStreamTrack.cpp",
115 "utility/AAudioUtilities.cpp",
116 "utility/FixedBlockAdapter.cpp",
117 "utility/FixedBlockReader.cpp",
118 "utility/FixedBlockWriter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700119 "fifo/FifoBuffer.cpp",
120 "fifo/FifoControllerBase.cpp",
Phil Burk0127c1b2018-03-29 13:48:06 -0700121 "client/AAudioFlowGraph.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700122 "client/AudioEndpoint.cpp",
123 "client/AudioStreamInternal.cpp",
124 "client/AudioStreamInternalCapture.cpp",
125 "client/AudioStreamInternalPlay.cpp",
126 "client/IsochronousClockModel.cpp",
127 "binding/AudioEndpointParcelable.cpp",
Ytai Ben-Tsvi734e3502020-08-24 14:57:36 -0700128 "binding/AAudioBinderAdapter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700129 "binding/AAudioBinderClient.cpp",
130 "binding/AAudioStreamRequest.cpp",
131 "binding/AAudioStreamConfiguration.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700132 "binding/RingBufferParcelable.cpp",
133 "binding/SharedMemoryParcelable.cpp",
134 "binding/SharedRegionParcelable.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700135 "flowgraph/AudioProcessorBase.cpp",
136 "flowgraph/ClipToRange.cpp",
137 "flowgraph/MonoToMultiConverter.cpp",
138 "flowgraph/RampLinear.cpp",
139 "flowgraph/SinkFloat.cpp",
140 "flowgraph/SinkI16.cpp",
141 "flowgraph/SinkI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700142 "flowgraph/SinkI32.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700143 "flowgraph/SourceFloat.cpp",
144 "flowgraph/SourceI16.cpp",
145 "flowgraph/SourceI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700146 "flowgraph/SourceI32.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700147 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700148 sanitize: {
149 integer_overflow: true,
150 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700151 },
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700152}
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700153
154aidl_interface {
155 name: "aaudio-aidl",
156 unstable: true,
157 local_include_dir: "binding/aidl",
158 srcs: [
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700159 "binding/aidl/aaudio/Endpoint.aidl",
160 "binding/aidl/aaudio/RingBuffer.aidl",
161 "binding/aidl/aaudio/SharedRegion.aidl",
162 "binding/aidl/aaudio/StreamParameters.aidl",
163 "binding/aidl/aaudio/StreamRequest.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700164 "binding/aidl/aaudio/IAAudioClient.aidl",
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700165 "binding/aidl/aaudio/IAAudioService.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700166 ],
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700167 imports: [
168 "audio_common-aidl",
169 "shared-file-region-aidl",
170 ],
171 backend:
172 {
173 cpp: {
174 enabled: true,
175 },
176 java: {
177 // TODO: need to have audio_common-aidl available in Java to enable
178 // this.
179 enabled: false,
180 },
181 },
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700182}