• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("../../../config.gni")
16
17config("audio_loopback_config") {
18  include_dirs = [
19    "./include",
20    "../audiostream/include",
21    "../../../interfaces/inner_api/native/audiorenderer/include",
22    "../../../interfaces/inner_api/native/audiocommon/include",
23    "../../../interfaces/inner_api/native/audiocapturer/include",
24    "../../../interfaces/inner_api/native/audiomanager/include",
25    "../../../frameworks/native/audiostream/include",
26    "../../../services/audio_service/client/include",
27  ]
28  cflags = [
29    "-Wall",
30    "-Werror",
31  ]
32  if (sonic_enable == true) {
33    cflags += [ "-DSONIC_ENABLE" ]
34  }
35}
36
37ohos_shared_library("audio_loopback") {
38  branch_protector_ret = "pac_ret"
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    debug = false
43    integer_overflow = true
44    ubsan = true
45    boundary_sanitize = true
46  }
47  install_enable = true
48
49  configs = [ ":audio_loopback_config" ]
50
51  sources = [ "src/audio_loopback.cpp" ]
52
53  defines = []
54  if (audio_framework_feature_low_latency) {
55    defines += [ "SUPPORT_LOW_LATENCY" ]
56  }
57
58  deps = [
59    "../../../services/audio_policy:audio_policy_client",
60    "../../../services/audio_service:audio_client",
61    "../../../services/audio_service:audio_common",
62    "../audiocapturer:audio_capturer",
63    "../audiorenderer:audio_renderer",
64    "../audiodefinitions:audio_definitions",
65    "../audioutils:audio_utils",
66  ]
67  external_deps = [
68    "access_token:libaccesstoken_sdk",
69    "access_token:libprivacy_sdk",
70    "access_token:libtokenid_sdk",
71    "c_utils:utils",
72    "eventhandler:libeventhandler",
73    "hilog:libhilog",
74    "ipc:ipc_single",
75    "media_foundation:media_monitor_client",
76    "media_foundation:media_monitor_common",
77    "samgr:samgr_proxy",
78  ]
79
80  public_configs = [ ":audio_external_library_config" ]
81
82  version_script = "../../../audio_framework.versionscript"
83  innerapi_tags = [ "platformsdk" ]
84
85  part_name = "audio_framework"
86  subsystem_name = "multimedia"
87}
88
89config("audio_external_library_config") {
90  include_dirs =
91      [
92        "../../../interfaces/inner_api/native/audiocapturer/include",
93        "../../../interfaces/inner_api/native/audiorenderer/include",
94        "../../../interfaces/inner_api/native/audioloopback/include",
95    ]
96}