1package { 2 // http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // the below license kinds from "system_media_license": 5 // SPDX-license-identifier-Apache-2.0 6 default_applicable_licenses: ["system_media_license"], 7} 8 9subdirs = ["tests"] 10 11cc_defaults { 12 name: "audio_utils_defaults", 13 14 local_include_dirs: ["include"], 15 export_include_dirs: ["include"], 16 17 cflags: [ 18 "-Werror", 19 "-Wall", 20 ], 21} 22 23cc_library_headers { 24 name: "libaudioutils_headers", 25 host_supported: true, 26 vendor_available: true, 27 product_available: true, 28 export_include_dirs: ["include"], 29 // referenced from CTS/MTS test suite which must run on sdk 29, make sure it's compatible 30 // (revisit if/when we add features to this library that require newer sdk. 31 sdk_version: "29", 32} 33 34cc_library { 35 name: "libaudioutils", 36 vendor_available: true, 37 product_available: true, 38 vndk: { 39 enabled: true, 40 }, 41 double_loadable: true, 42 host_supported: true, 43 defaults: ["audio_utils_defaults"], 44 45 srcs: [ 46 "Balance.cpp", 47 "channels.cpp", 48 "ErrorLog.cpp", 49 "fifo.cpp", 50 "fifo_index.cpp", 51 "fifo_writer_T.cpp", 52 "format.c", 53 "limiter.c", 54 "Metadata.cpp", 55 "minifloat.c", 56 "mono_blend.cpp", 57 "power.cpp", 58 "PowerLog.cpp", 59 "primitives.c", 60 "roundup.c", 61 "sample.c", 62 ], 63 64 header_libs: [ 65 "libaudio_system_headers", 66 "libutils_headers", 67 ], 68 69 export_header_lib_headers: [ 70 "libaudio_system_headers", 71 "libutils_headers", 72 ], 73 74 shared_libs: [ 75 "libcutils", 76 "liblog", 77 ], 78 79 target: { 80 android: { 81 srcs: [ 82 // "mono_blend.cpp", 83 "resampler.c", 84 "echo_reference.c", 85 ], 86 whole_static_libs: ["libaudioutils_fixedfft"], 87 shared_libs: [ 88 "libspeexresampler", 89 ], 90 }, 91 host: { 92 cflags: ["-D__unused=__attribute__((unused))"], 93 }, 94 }, 95 min_sdk_version: "29", 96} 97 98cc_library_static { 99 name: "libaudioutils_fixedfft", 100 vendor_available: true, 101 product_available: true, 102 defaults: ["audio_utils_defaults"], 103 104 arch: { 105 arm: { 106 instruction_set: "arm", 107 }, 108 }, 109 110 srcs: ["fixedfft.cpp"], 111 min_sdk_version: "29", 112} 113 114cc_library_static { 115 name: "libsndfile", 116 defaults: ["audio_utils_defaults"], 117 host_supported: true, 118 srcs: ["tinysndfile.c"], 119 cflags: [ 120 "-UHAVE_STDERR", 121 ], 122} 123 124cc_library_static { 125 name: "libfifo", 126 defaults: ["audio_utils_defaults"], 127 srcs: [ 128 "fifo.cpp", 129 "fifo_index.cpp", 130 "primitives.c", 131 "roundup.c", 132 ], 133 min_sdk_version: "29", 134 host_supported: true, 135 target: { 136 darwin: { 137 enabled: false, 138 }, 139 }, 140} 141 142cc_library_shared { 143 name: "libaudiospdif", 144 host_supported: true, 145 defaults: ["audio_utils_defaults"], 146 147 srcs: [ 148 "spdif/BitFieldParser.cpp", 149 "spdif/FrameScanner.cpp", 150 "spdif/AC3FrameScanner.cpp", 151 "spdif/DTSFrameScanner.cpp", 152 "spdif/SPDIFEncoder.cpp", 153 ], 154 155 shared_libs: [ 156 "libcutils", 157 "liblog", 158 ], 159} 160