1subdirs = ["tests"]
2
3cc_defaults {
4    name: "audio_utils_defaults",
5
6    local_include_dirs: ["include"],
7    export_include_dirs: ["include"],
8
9    cflags: [
10        "-Werror",
11        "-Wall",
12    ],
13}
14
15cc_library {
16    name: "libaudioutils",
17    vendor_available: true,
18    host_supported: true,
19    defaults: ["audio_utils_defaults"],
20
21    srcs: [
22        "channels.c",
23        "ErrorLog.cpp",
24        "fifo.cpp",
25        "fifo_index.cpp",
26        "format.c",
27        "limiter.c",
28        "minifloat.c",
29        "power.cpp",
30        "PowerLog.cpp",
31        "primitives.c",
32        "roundup.c",
33    ],
34
35    shared_libs: [
36        "libcutils",
37        "liblog",
38    ],
39
40    target: {
41        android: {
42            srcs: [
43                "mono_blend.cpp",
44                "resampler.c",
45                "echo_reference.c",
46            ],
47            whole_static_libs: ["libaudioutils_fixedfft"],
48            shared_libs: [
49                "libspeexresampler",
50            ],
51        },
52        host: {
53            cflags: ["-D__unused=__attribute__((unused))"],
54        },
55    },
56}
57
58cc_library_static {
59    name: "libaudioutils_fixedfft",
60    vendor_available: true,
61    defaults: ["audio_utils_defaults"],
62
63    arch: {
64        arm: {
65            instruction_set: "arm",
66        },
67    },
68
69    srcs: ["fixedfft.cpp"],
70}
71
72cc_library_static {
73    name: "libsndfile",
74    defaults: ["audio_utils_defaults"],
75    host_supported: true,
76    srcs: ["tinysndfile.c"],
77    cflags: [
78        "-UHAVE_STDERR",
79    ],
80}
81
82cc_library_static {
83    name: "libfifo",
84    defaults: ["audio_utils_defaults"],
85    srcs: [
86        "fifo.cpp",
87        "fifo_index.cpp",
88        "primitives.c",
89        "roundup.c",
90    ],
91}
92
93cc_library_shared {
94    name: "libaudiospdif",
95    defaults: ["audio_utils_defaults"],
96
97    srcs: [
98        "spdif/BitFieldParser.cpp",
99        "spdif/FrameScanner.cpp",
100        "spdif/AC3FrameScanner.cpp",
101        "spdif/DTSFrameScanner.cpp",
102        "spdif/SPDIFEncoder.cpp",
103    ],
104
105    shared_libs: [
106        "libcutils",
107        "liblog",
108    ],
109}
110