blob: d02d1b6b9fdbddd54aee0c3a4f5e43626c589e4c [file] [log] [blame]
Dan Willemsenb44c69e2017-10-23 17:15:03 -07001cc_library {
2 name: "libaaudio",
3
4 local_include_dirs: [
5 "binding",
6 "client",
7 "core",
8 "fifo",
Phil Burk64dce362018-03-28 15:30:39 -07009 "flowgraph",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070010 "legacy",
11 "utility",
12 ],
Marco Nelissen6b285942019-10-21 14:52:30 -070013 header_libs: [
14 "libaaudio_headers",
15 ],
Dan Willemsenb44c69e2017-10-23 17:15:03 -070016 export_header_lib_headers: ["libaaudio_headers"],
dimitry8e8a9682019-06-04 15:14:02 +020017 version_script: "libaaudio.map.txt",
Dan Willemsenb44c69e2017-10-23 17:15:03 -070018
19 srcs: [
dimitryd81a84a2019-07-17 13:55:16 +020020 "core/AAudioAudio.cpp",
21 ],
22
23 cflags: [
Phil Burk0bd745e2020-10-17 18:20:01 +000024 "-Wthread-safety",
dimitryd81a84a2019-07-17 13:55:16 +020025 "-Wno-unused-parameter",
26 "-Wall",
27 "-Werror",
28
29 // By default, all symbols are hidden.
30 // "-fvisibility=hidden",
31 // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
32 "-DAAUDIO_API=__attribute__((visibility(\"default\")))",
33 ],
34
35 shared_libs: [
36 "libaaudio_internal",
37 "libaudioclient",
38 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070039 "libmedia_helper",
40 "libmediametrics",
41 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020042 "liblog",
43 "libcutils",
44 "libutils",
45 "libbinder",
46 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -070047
48 sanitize: {
49 integer_overflow: true,
50 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -070051 },
52
Zach Johnson99c47ff2019-12-02 15:28:34 -080053 stubs: {
54 symbol_file: "libaaudio.map.txt",
55 versions: ["28"],
56 },
dimitryd81a84a2019-07-17 13:55:16 +020057}
58
59cc_library {
60 name: "libaaudio_internal",
61
62 local_include_dirs: [
63 "binding",
64 "client",
65 "core",
66 "fifo",
67 "legacy",
68 "utility",
69 ],
70
71 export_include_dirs: ["."],
Marco Nelissen6b285942019-10-21 14:52:30 -070072 header_libs: [
73 "libaaudio_headers",
Cindy Zhou30ed5942019-10-30 13:24:37 -070074 "libmedia_headers",
Marco Nelissen7c96ea72020-01-10 15:46:22 -080075 "libmediametrics_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -070076 ],
dimitryd81a84a2019-07-17 13:55:16 +020077 export_header_lib_headers: ["libaaudio_headers"],
78
79 shared_libs: [
80 "libaudioclient",
81 "libaudioutils",
Phil Burka9876702020-04-20 18:16:15 -070082 "libmedia_helper",
83 "libmediametrics",
84 "libmediautils",
dimitryd81a84a2019-07-17 13:55:16 +020085 "liblog",
86 "libcutils",
87 "libutils",
88 "libbinder",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -070089 "aaudio-aidl-cpp",
dimitryd81a84a2019-07-17 13:55:16 +020090 ],
91
92 cflags: [
93 "-Wno-unused-parameter",
94 "-Wall",
95 "-Werror",
96 ],
97
98 srcs: [
99 "core/AudioGlobal.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700100 "core/AudioStream.cpp",
101 "core/AudioStreamBuilder.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700102 "core/AAudioStreamParameters.cpp",
103 "legacy/AudioStreamLegacy.cpp",
104 "legacy/AudioStreamRecord.cpp",
105 "legacy/AudioStreamTrack.cpp",
106 "utility/AAudioUtilities.cpp",
107 "utility/FixedBlockAdapter.cpp",
108 "utility/FixedBlockReader.cpp",
109 "utility/FixedBlockWriter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700110 "fifo/FifoBuffer.cpp",
111 "fifo/FifoControllerBase.cpp",
Phil Burk0127c1b2018-03-29 13:48:06 -0700112 "client/AAudioFlowGraph.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700113 "client/AudioEndpoint.cpp",
114 "client/AudioStreamInternal.cpp",
115 "client/AudioStreamInternalCapture.cpp",
116 "client/AudioStreamInternalPlay.cpp",
117 "client/IsochronousClockModel.cpp",
118 "binding/AudioEndpointParcelable.cpp",
Ytai Ben-Tsvi734e3502020-08-24 14:57:36 -0700119 "binding/AAudioBinderAdapter.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700120 "binding/AAudioBinderClient.cpp",
121 "binding/AAudioStreamRequest.cpp",
122 "binding/AAudioStreamConfiguration.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700123 "binding/RingBufferParcelable.cpp",
124 "binding/SharedMemoryParcelable.cpp",
125 "binding/SharedRegionParcelable.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700126 "flowgraph/AudioProcessorBase.cpp",
127 "flowgraph/ClipToRange.cpp",
128 "flowgraph/MonoToMultiConverter.cpp",
129 "flowgraph/RampLinear.cpp",
130 "flowgraph/SinkFloat.cpp",
131 "flowgraph/SinkI16.cpp",
132 "flowgraph/SinkI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700133 "flowgraph/SinkI32.cpp",
Phil Burk64dce362018-03-28 15:30:39 -0700134 "flowgraph/SourceFloat.cpp",
135 "flowgraph/SourceI16.cpp",
136 "flowgraph/SourceI24.cpp",
Phil Burk04e805b2018-03-27 09:13:53 -0700137 "flowgraph/SourceI32.cpp",
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700138 ],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700139 sanitize: {
140 integer_overflow: true,
141 misc_undefined: ["bounds"],
Cindy Zhou30ed5942019-10-30 13:24:37 -0700142 },
Dan Willemsenb44c69e2017-10-23 17:15:03 -0700143}
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700144
145aidl_interface {
146 name: "aaudio-aidl",
147 unstable: true,
148 local_include_dir: "binding/aidl",
149 srcs: [
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700150 "binding/aidl/aaudio/Endpoint.aidl",
151 "binding/aidl/aaudio/RingBuffer.aidl",
152 "binding/aidl/aaudio/SharedRegion.aidl",
153 "binding/aidl/aaudio/StreamParameters.aidl",
154 "binding/aidl/aaudio/StreamRequest.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700155 "binding/aidl/aaudio/IAAudioClient.aidl",
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700156 "binding/aidl/aaudio/IAAudioService.aidl",
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700157 ],
Ytai Ben-Tsvic5f45872020-08-18 10:39:44 -0700158 imports: [
159 "audio_common-aidl",
160 "shared-file-region-aidl",
161 ],
162 backend:
163 {
164 cpp: {
165 enabled: true,
166 },
167 java: {
168 // TODO: need to have audio_common-aidl available in Java to enable
169 // this.
170 enabled: false,
171 },
172 },
Ytai Ben-Tsvi0412f732020-08-17 14:43:36 -0700173}