1cc_library_headers {
2    name: "libaudioclient_headers",
3    vendor_available: true,
4    min_sdk_version: "29",
5
6    header_libs: [
7        "libaudiofoundation_headers",
8    ],
9    export_include_dirs: [
10        "include",
11    ],
12    export_header_lib_headers: [
13        "libaudiofoundation_headers",
14    ],
15    host_supported: true,
16    target: {
17        darwin: {
18            enabled: false,
19        },
20    },
21}
22
23cc_library_shared {
24    name: "libaudiopolicy",
25    srcs: [
26        "AudioAttributes.cpp",
27        "AudioPolicy.cpp",
28        "AudioProductStrategy.cpp",
29        "AudioVolumeGroup.cpp",
30    ],
31    shared_libs: [
32        "libaudiofoundation",
33        "libaudioutils",
34        "libbinder",
35        "libcutils",
36        "liblog",
37        "libutils",
38    ],
39    cflags: [
40        "-Werror",
41        "-Wall",
42    ],
43    include_dirs: ["system/media/audio_utils/include"],
44    export_include_dirs: ["include"],
45}
46
47cc_library_shared {
48    name: "libaudioclient",
49
50    aidl: {
51        export_aidl_headers: true,
52        local_include_dirs: ["aidl"],
53        include_dirs: [
54            "frameworks/av/media/libaudioclient/aidl",
55        ],
56    },
57
58    srcs: [
59        // AIDL files for audioclient interfaces
60        // The headers for these interfaces will be available to any modules that
61        // include libaudioclient, at the path "aidl/package/path/BnFoo.h"
62        ":libaudioclient_aidl_private",
63        ":libaudioclient_aidl",
64
65        "AudioEffect.cpp",
66        "AudioRecord.cpp",
67        "AudioSystem.cpp",
68        "AudioTrack.cpp",
69        "AudioTrackShared.cpp",
70        "IAudioFlinger.cpp",
71        "IAudioFlingerClient.cpp",
72        "IAudioPolicyService.cpp",
73        "IAudioPolicyServiceClient.cpp",
74        "IAudioTrack.cpp",
75        "IEffect.cpp",
76        "IEffectClient.cpp",
77        "ToneGenerator.cpp",
78        "PlayerBase.cpp",
79        "RecordingActivityTracker.cpp",
80        "TrackPlayerBase.cpp",
81    ],
82    shared_libs: [
83        "libaudiofoundation",
84        "libaudioutils",
85        "libaudiopolicy",
86        "libaudiomanager",
87        "libbinder",
88        "libcutils",
89        "libdl",
90        "liblog",
91        "libmedia_helper",
92        "libmediametrics",
93        "libmediautils",
94        "libnblog",
95        "libprocessgroup",
96        "libutils",
97        "libvibrator",
98    ],
99    export_shared_lib_headers: ["libbinder"],
100
101    local_include_dirs: ["include/media", "aidl"],
102    header_libs: [
103        "libaudioclient_headers",
104        "libbase_headers",
105        "libmedia_headers",
106    ],
107    export_header_lib_headers: ["libaudioclient_headers"],
108
109    // for memory heap analysis
110    static_libs: [
111        "libc_malloc_debug_backtrace",
112    ],
113    cflags: [
114        "-Wall",
115        "-Werror",
116        "-Wno-error=deprecated-declarations",
117    ],
118    sanitize: {
119        misc_undefined : [
120            "unsigned-integer-overflow",
121            "signed-integer-overflow",
122        ],
123    },
124}
125
126// AIDL interface between libaudioclient and framework.jar
127filegroup {
128    name: "libaudioclient_aidl",
129    srcs: [
130        "aidl/android/media/IPlayer.aidl",
131    ],
132    path: "aidl",
133}
134
135// Used to strip the "aidl/" from the path, so the build system can predict the
136// output filename.
137filegroup {
138    name: "libaudioclient_aidl_private",
139    srcs: [
140        "aidl/android/media/IAudioRecord.aidl",
141    ],
142    path: "aidl",
143}
144