Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 1 | cc_library { |
| 2 | name: "libaaudio", |
| 3 | |
| 4 | local_include_dirs: [ |
| 5 | "binding", |
| 6 | "client", |
| 7 | "core", |
| 8 | "fifo", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 9 | "flowgraph", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 10 | "legacy", |
| 11 | "utility", |
| 12 | ], |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 13 | header_libs: [ |
| 14 | "libaaudio_headers", |
| 15 | ], |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 16 | export_header_lib_headers: ["libaaudio_headers"], |
dimitry | 8e8a968 | 2019-06-04 15:14:02 +0200 | [diff] [blame] | 17 | version_script: "libaaudio.map.txt", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 18 | |
| 19 | srcs: [ |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 20 | "core/AAudioAudio.cpp", |
| 21 | ], |
| 22 | |
| 23 | cflags: [ |
Phil Burk | 0bd745e | 2020-10-17 18:20:01 +0000 | [diff] [blame] | 24 | "-Wthread-safety", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 25 | "-Wno-unused-parameter", |
| 26 | "-Wall", |
| 27 | "-Werror", |
| 28 | |
| 29 | // By default, all symbols are hidden. |
| 30 | // "-fvisibility=hidden", |
| 31 | // AAUDIO_API is used to explicitly export a function or a variable as a visible symbol. |
| 32 | "-DAAUDIO_API=__attribute__((visibility(\"default\")))", |
| 33 | ], |
| 34 | |
| 35 | shared_libs: [ |
| 36 | "libaaudio_internal", |
| 37 | "libaudioclient", |
| 38 | "libaudioutils", |
Phil Burk | a987670 | 2020-04-20 18:16:15 -0700 | [diff] [blame] | 39 | "libmedia_helper", |
| 40 | "libmediametrics", |
| 41 | "libmediautils", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 42 | "liblog", |
| 43 | "libcutils", |
| 44 | "libutils", |
| 45 | "libbinder", |
| 46 | ], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 47 | |
| 48 | sanitize: { |
| 49 | integer_overflow: true, |
| 50 | misc_undefined: ["bounds"], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 51 | }, |
| 52 | |
Zach Johnson | 99c47ff | 2019-12-02 15:28:34 -0800 | [diff] [blame] | 53 | stubs: { |
| 54 | symbol_file: "libaaudio.map.txt", |
| 55 | versions: ["28"], |
| 56 | }, |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | cc_library { |
| 60 | name: "libaaudio_internal", |
| 61 | |
| 62 | local_include_dirs: [ |
| 63 | "binding", |
| 64 | "client", |
| 65 | "core", |
| 66 | "fifo", |
| 67 | "legacy", |
| 68 | "utility", |
| 69 | ], |
| 70 | |
| 71 | export_include_dirs: ["."], |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 72 | header_libs: [ |
| 73 | "libaaudio_headers", |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 74 | "libmedia_headers", |
Marco Nelissen | 7c96ea7 | 2020-01-10 15:46:22 -0800 | [diff] [blame] | 75 | "libmediametrics_headers", |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 76 | ], |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 77 | export_header_lib_headers: ["libaaudio_headers"], |
| 78 | |
| 79 | shared_libs: [ |
| 80 | "libaudioclient", |
| 81 | "libaudioutils", |
Phil Burk | a987670 | 2020-04-20 18:16:15 -0700 | [diff] [blame] | 82 | "libmedia_helper", |
| 83 | "libmediametrics", |
| 84 | "libmediautils", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 85 | "liblog", |
| 86 | "libcutils", |
| 87 | "libutils", |
| 88 | "libbinder", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 89 | "aaudio-aidl-cpp", |
dimitry | d81a84a | 2019-07-17 13:55:16 +0200 | [diff] [blame] | 90 | ], |
| 91 | |
| 92 | cflags: [ |
| 93 | "-Wno-unused-parameter", |
| 94 | "-Wall", |
| 95 | "-Werror", |
| 96 | ], |
| 97 | |
| 98 | srcs: [ |
| 99 | "core/AudioGlobal.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 100 | "core/AudioStream.cpp", |
| 101 | "core/AudioStreamBuilder.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 102 | "core/AAudioStreamParameters.cpp", |
| 103 | "legacy/AudioStreamLegacy.cpp", |
| 104 | "legacy/AudioStreamRecord.cpp", |
| 105 | "legacy/AudioStreamTrack.cpp", |
| 106 | "utility/AAudioUtilities.cpp", |
| 107 | "utility/FixedBlockAdapter.cpp", |
| 108 | "utility/FixedBlockReader.cpp", |
| 109 | "utility/FixedBlockWriter.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 110 | "fifo/FifoBuffer.cpp", |
| 111 | "fifo/FifoControllerBase.cpp", |
Phil Burk | 0127c1b | 2018-03-29 13:48:06 -0700 | [diff] [blame] | 112 | "client/AAudioFlowGraph.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 113 | "client/AudioEndpoint.cpp", |
| 114 | "client/AudioStreamInternal.cpp", |
| 115 | "client/AudioStreamInternalCapture.cpp", |
| 116 | "client/AudioStreamInternalPlay.cpp", |
| 117 | "client/IsochronousClockModel.cpp", |
| 118 | "binding/AudioEndpointParcelable.cpp", |
Ytai Ben-Tsvi | 734e350 | 2020-08-24 14:57:36 -0700 | [diff] [blame] | 119 | "binding/AAudioBinderAdapter.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 120 | "binding/AAudioBinderClient.cpp", |
| 121 | "binding/AAudioStreamRequest.cpp", |
| 122 | "binding/AAudioStreamConfiguration.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 123 | "binding/RingBufferParcelable.cpp", |
| 124 | "binding/SharedMemoryParcelable.cpp", |
| 125 | "binding/SharedRegionParcelable.cpp", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 126 | "flowgraph/AudioProcessorBase.cpp", |
| 127 | "flowgraph/ClipToRange.cpp", |
| 128 | "flowgraph/MonoToMultiConverter.cpp", |
| 129 | "flowgraph/RampLinear.cpp", |
| 130 | "flowgraph/SinkFloat.cpp", |
| 131 | "flowgraph/SinkI16.cpp", |
| 132 | "flowgraph/SinkI24.cpp", |
Phil Burk | 04e805b | 2018-03-27 09:13:53 -0700 | [diff] [blame] | 133 | "flowgraph/SinkI32.cpp", |
Phil Burk | 64dce36 | 2018-03-28 15:30:39 -0700 | [diff] [blame] | 134 | "flowgraph/SourceFloat.cpp", |
| 135 | "flowgraph/SourceI16.cpp", |
| 136 | "flowgraph/SourceI24.cpp", |
Phil Burk | 04e805b | 2018-03-27 09:13:53 -0700 | [diff] [blame] | 137 | "flowgraph/SourceI32.cpp", |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 138 | ], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 139 | sanitize: { |
| 140 | integer_overflow: true, |
| 141 | misc_undefined: ["bounds"], |
Cindy Zhou | 30ed594 | 2019-10-30 13:24:37 -0700 | [diff] [blame] | 142 | }, |
Dan Willemsen | b44c69e | 2017-10-23 17:15:03 -0700 | [diff] [blame] | 143 | } |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 144 | |
| 145 | aidl_interface { |
| 146 | name: "aaudio-aidl", |
| 147 | unstable: true, |
| 148 | local_include_dir: "binding/aidl", |
| 149 | srcs: [ |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 150 | "binding/aidl/aaudio/Endpoint.aidl", |
| 151 | "binding/aidl/aaudio/RingBuffer.aidl", |
| 152 | "binding/aidl/aaudio/SharedRegion.aidl", |
| 153 | "binding/aidl/aaudio/StreamParameters.aidl", |
| 154 | "binding/aidl/aaudio/StreamRequest.aidl", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 155 | "binding/aidl/aaudio/IAAudioClient.aidl", |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 156 | "binding/aidl/aaudio/IAAudioService.aidl", |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 157 | ], |
Ytai Ben-Tsvi | c5f4587 | 2020-08-18 10:39:44 -0700 | [diff] [blame] | 158 | imports: [ |
| 159 | "audio_common-aidl", |
| 160 | "shared-file-region-aidl", |
| 161 | ], |
| 162 | backend: |
| 163 | { |
| 164 | cpp: { |
| 165 | enabled: true, |
| 166 | }, |
| 167 | java: { |
| 168 | // TODO: need to have audio_common-aidl available in Java to enable |
| 169 | // this. |
| 170 | enabled: false, |
| 171 | }, |
| 172 | }, |
Ytai Ben-Tsvi | 0412f73 | 2020-08-17 14:43:36 -0700 | [diff] [blame] | 173 | } |