• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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("../../../audio_framework_test_sources.gni")
16import("../../../config.gni")
17import("../../../sensor.gni")
18import("../../../window_manager.gni")
19
20config("audio_effect_config") {
21  include_dirs = [
22    "include",
23    "../audiostream/include",
24    "../../../interfaces/inner_api/native/audiorenderer/include",
25    "../../../interfaces/inner_api/native/audiocommon/include",
26    "../../../interfaces/inner_api/native/audiomanager/include",
27    "../../../services/audio_service/client/include",
28    "../../../services/audio_service/common/include",
29    "../../../services/audio_service/test/example",
30    "../../../services/audio_policy/server/include/service/manager",
31    "../../../services/audio_policy/util/include",
32  ]
33
34  cflags = [
35    "-Wall",
36    "-Werror",
37    "-fno-access-control",
38  ]
39
40  if (sensor_enable == true) {
41    cflags += [ "-DSENSOR_ENABLE" ]
42  }
43
44  if (window_manager_enable == true) {
45    cflags += [ "-DWINDOW_MANAGER_ENABLE" ]
46  }
47}
48
49config("audio_effect_integration_config") {
50  include_dirs = [ "../../../interfaces/inner_api/native/audiocommon/include" ]
51}
52
53audio_ohos_library("audio_effect") {
54  branch_protector_ret = "pac_ret"
55  sanitize = {
56    cfi = true
57    cfi_cross_dso = true
58    cfi_vcall_icall_only = true
59    debug = false
60    integer_overflow = true
61    ubsan = true
62    boundary_sanitize = true
63  }
64  install_enable = true
65
66  configs = [ ":audio_effect_config" ]
67
68  sources = [
69    "src/audio_effect_chain.cpp",
70    "src/audio_effect_chain_adapter.cpp",
71    "src/audio_effect_chain_manager.cpp",
72    "src/audio_effect_hdi_param.cpp",
73    "src/audio_effect_rotation.cpp",
74    "src/audio_effect_volume.cpp",
75    "src/audio_enhance_chain.cpp",
76    "src/audio_enhance_chain_adapter.cpp",
77    "src/audio_enhance_chain_manager.cpp",
78    "src/audio_head_tracker.cpp",
79  ]
80
81  deps = [
82    "../../../services/audio_policy:audio_foundation",
83    "../../../services/audio_policy:audio_setting_provider",
84    "../../../services/audio_service:audio_common",
85    "../audioutils:audio_utils",
86  ]
87
88  external_deps = [
89    "c_utils:utils",
90    "data_share:datashare_common",
91    "data_share:datashare_consumer",
92    "drivers_interface_audio:libeffect_proxy_1.0",
93    "hdf_core:libhdf_utils",
94    "hilog:libhilog",
95    "ipc:ipc_single",
96    "media_foundation:media_monitor_client",
97    "os_account:os_account_innerkits",
98    "pulseaudio:pulse",
99    "samgr:samgr_proxy",
100  ]
101
102  if (sensor_enable == true) {
103    external_deps += [ "sensor:sensor_interface_native" ]
104  }
105
106  cflags = [ "-Os" ]
107  cflags_cc = cflags
108
109  part_name = "audio_framework"
110  subsystem_name = "multimedia"
111  version_script = "libaudio_effect.versionscript"
112}
113
114ohos_static_library("audio_effect_integration") {
115  sanitize = {
116    cfi = true
117    cfi_cross_dso = true
118    cfi_vcall_icall_only = true
119    debug = false
120    integer_overflow = true
121    ubsan = true
122    boundary_sanitize = true
123  }
124
125  public_configs = [ ":audio_effect_integration_config" ]
126
127  part_name = "audio_framework"
128  subsystem_name = "multimedia"
129}
130