1cc_library {
2    name: "libaaudio",
3
4    local_include_dirs: [
5        "binding",
6        "client",
7        "core",
8        "fifo",
9        "flowgraph",
10        "legacy",
11        "utility",
12    ],
13    header_libs: [
14        "libaaudio_headers",
15    ],
16    export_header_lib_headers: ["libaaudio_headers"],
17    version_script: "libaaudio.map.txt",
18
19    srcs: [
20        "core/AAudioAudio.cpp",
21    ],
22
23    cflags: [
24        "-Wno-unused-parameter",
25        "-Wall",
26        "-Werror",
27
28        // By default, all symbols are hidden.
29        // "-fvisibility=hidden",
30        // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol.
31        "-DAAUDIO_API=__attribute__((visibility(\"default\")))",
32    ],
33
34    shared_libs: [
35        "libaaudio_internal",
36        "libaudioclient",
37        "libaudioutils",
38        "libmedia_helper",
39        "libmediametrics",
40        "libmediautils",
41        "liblog",
42        "libcutils",
43        "libutils",
44        "libbinder",
45    ],
46
47    sanitize: {
48        integer_overflow: true,
49        misc_undefined: ["bounds"],
50    },
51
52    stubs: {
53        symbol_file: "libaaudio.map.txt",
54        versions: ["28"],
55    },
56}
57
58cc_library {
59    name: "libaaudio_internal",
60
61    local_include_dirs: [
62        "binding",
63        "client",
64        "core",
65        "fifo",
66        "legacy",
67        "utility",
68    ],
69
70    export_include_dirs: ["."],
71    header_libs: [
72        "libaaudio_headers",
73        "libmedia_headers",
74        "libmediametrics_headers",
75    ],
76    export_header_lib_headers: ["libaaudio_headers"],
77
78    shared_libs: [
79        "libaudioclient",
80        "libaudioutils",
81        "libmedia_helper",
82        "libmediametrics",
83        "libmediautils",
84        "liblog",
85        "libcutils",
86        "libutils",
87        "libbinder",
88    ],
89
90    cflags: [
91        "-Wno-unused-parameter",
92        "-Wall",
93        "-Werror",
94    ],
95
96    srcs: [
97        "core/AudioGlobal.cpp",
98        "core/AudioStream.cpp",
99        "core/AudioStreamBuilder.cpp",
100        "core/AAudioStreamParameters.cpp",
101        "legacy/AudioStreamLegacy.cpp",
102        "legacy/AudioStreamRecord.cpp",
103        "legacy/AudioStreamTrack.cpp",
104        "utility/AAudioUtilities.cpp",
105        "utility/FixedBlockAdapter.cpp",
106        "utility/FixedBlockReader.cpp",
107        "utility/FixedBlockWriter.cpp",
108        "fifo/FifoBuffer.cpp",
109        "fifo/FifoControllerBase.cpp",
110        "client/AAudioFlowGraph.cpp",
111        "client/AudioEndpoint.cpp",
112        "client/AudioStreamInternal.cpp",
113        "client/AudioStreamInternalCapture.cpp",
114        "client/AudioStreamInternalPlay.cpp",
115        "client/IsochronousClockModel.cpp",
116        "binding/AudioEndpointParcelable.cpp",
117        "binding/AAudioBinderClient.cpp",
118        "binding/AAudioStreamRequest.cpp",
119        "binding/AAudioStreamConfiguration.cpp",
120        "binding/IAAudioClient.cpp",
121        "binding/IAAudioService.cpp",
122        "binding/RingBufferParcelable.cpp",
123        "binding/SharedMemoryParcelable.cpp",
124        "binding/SharedRegionParcelable.cpp",
125        "flowgraph/AudioProcessorBase.cpp",
126        "flowgraph/ClipToRange.cpp",
127        "flowgraph/MonoToMultiConverter.cpp",
128        "flowgraph/RampLinear.cpp",
129        "flowgraph/SinkFloat.cpp",
130        "flowgraph/SinkI16.cpp",
131        "flowgraph/SinkI24.cpp",
132        "flowgraph/SourceFloat.cpp",
133        "flowgraph/SourceI16.cpp",
134        "flowgraph/SourceI24.cpp",
135    ],
136    sanitize: {
137        integer_overflow: true,
138        misc_undefined: ["bounds"],
139    },
140}
141