• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
10cc_library {
11    name: "libaaudio",
12
13    local_include_dirs: [
14        "binding",
15        "client",
16        "core",
17        "fifo",
18        "flowgraph",
19        "legacy",
20        "utility",
21    ],
22    header_libs: [
23        "libaaudio_headers",
24    ],
25    export_header_lib_headers: ["libaaudio_headers"],
26    version_script: "libaaudio.map.txt",
27
28    srcs: [
29        "core/AAudioAudio.cpp",
30    ],
31
32    cflags: [
33        "-Wthread-safety",
34        "-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",
48        "libmedia_helper",
49        "libmediametrics",
50        "libmediautils",
51        "liblog",
52        "libcutils",
53        "libutils",
54        "libbinder",
55        "libpermission",
56    ],
57
58    sanitize: {
59        integer_overflow: true,
60        misc_undefined: ["bounds"],
61    },
62
63    stubs: {
64        symbol_file: "libaaudio.map.txt",
65        versions: ["28"],
66    },
67}
68
69cc_library {
70    name: "libaaudio_internal",
71
72    local_include_dirs: [
73        "binding",
74        "client",
75        "core",
76        "fifo",
77        "legacy",
78        "utility",
79    ],
80
81    export_include_dirs: ["."],
82    header_libs: [
83        "libaaudio_headers",
84        "libmedia_headers",
85        "libmediametrics_headers",
86    ],
87    export_header_lib_headers: ["libaaudio_headers"],
88
89    export_shared_lib_headers: [
90        "framework-permission-aidl-cpp",
91    ],
92
93    shared_libs: [
94        "libaudioclient",
95        "libaudioutils",
96        "libmedia_helper",
97        "libmediametrics",
98        "libmediautils",
99        "liblog",
100        "libcutils",
101        "libutils",
102        "libbinder",
103        "framework-permission-aidl-cpp",
104        "aaudio-aidl-cpp",
105        "libaudioclient_aidl_conversion",
106    ],
107
108    cflags: [
109        "-Wno-unused-parameter",
110        "-Wall",
111        "-Werror",
112    ],
113
114    srcs: [
115        "core/AudioGlobal.cpp",
116        "core/AudioStream.cpp",
117        "core/AudioStreamBuilder.cpp",
118        "core/AAudioStreamParameters.cpp",
119        "legacy/AudioStreamLegacy.cpp",
120        "legacy/AudioStreamRecord.cpp",
121        "legacy/AudioStreamTrack.cpp",
122        "utility/AAudioUtilities.cpp",
123        "utility/FixedBlockAdapter.cpp",
124        "utility/FixedBlockReader.cpp",
125        "utility/FixedBlockWriter.cpp",
126        "fifo/FifoBuffer.cpp",
127        "fifo/FifoControllerBase.cpp",
128        "client/AAudioFlowGraph.cpp",
129        "client/AudioEndpoint.cpp",
130        "client/AudioStreamInternal.cpp",
131        "client/AudioStreamInternalCapture.cpp",
132        "client/AudioStreamInternalPlay.cpp",
133        "client/IsochronousClockModel.cpp",
134        "binding/AudioEndpointParcelable.cpp",
135        "binding/AAudioBinderAdapter.cpp",
136        "binding/AAudioBinderClient.cpp",
137        "binding/AAudioStreamRequest.cpp",
138        "binding/AAudioStreamConfiguration.cpp",
139        "binding/RingBufferParcelable.cpp",
140        "binding/SharedMemoryParcelable.cpp",
141        "binding/SharedRegionParcelable.cpp",
142        "flowgraph/AudioProcessorBase.cpp",
143        "flowgraph/ClipToRange.cpp",
144        "flowgraph/MonoToMultiConverter.cpp",
145        "flowgraph/RampLinear.cpp",
146        "flowgraph/SinkFloat.cpp",
147        "flowgraph/SinkI16.cpp",
148        "flowgraph/SinkI24.cpp",
149        "flowgraph/SinkI32.cpp",
150        "flowgraph/SourceFloat.cpp",
151        "flowgraph/SourceI16.cpp",
152        "flowgraph/SourceI24.cpp",
153        "flowgraph/SourceI32.cpp",
154    ],
155    sanitize: {
156        integer_overflow: true,
157        misc_undefined: ["bounds"],
158    },
159}
160
161aidl_interface {
162    name: "aaudio-aidl",
163    unstable: true,
164    local_include_dir: "binding/aidl",
165    srcs: [
166        "binding/aidl/aaudio/Endpoint.aidl",
167        "binding/aidl/aaudio/RingBuffer.aidl",
168        "binding/aidl/aaudio/SharedRegion.aidl",
169        "binding/aidl/aaudio/StreamParameters.aidl",
170        "binding/aidl/aaudio/StreamRequest.aidl",
171        "binding/aidl/aaudio/IAAudioClient.aidl",
172        "binding/aidl/aaudio/IAAudioService.aidl",
173    ],
174    imports: [
175        "audio_common-aidl",
176        "shared-file-region-aidl",
177        "framework-permission-aidl"
178    ],
179    backend:
180    {
181        cpp: {
182            enabled: true,
183        },
184        java: {
185            // TODO: need to have audio_common-aidl available in Java to enable
186            //       this.
187            enabled: false,
188        },
189    },
190}
191