146f34cbfSopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
246f34cbfSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
346f34cbfSopenharmony_ci# you may not use this file except in compliance with the License.
446f34cbfSopenharmony_ci# You may obtain a copy of the License at
546f34cbfSopenharmony_ci#
646f34cbfSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
746f34cbfSopenharmony_ci#
846f34cbfSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
946f34cbfSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1046f34cbfSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1146f34cbfSopenharmony_ci# See the License for the specific language governing permissions and
1246f34cbfSopenharmony_ci# limitations under the License.
1346f34cbfSopenharmony_ci
1446f34cbfSopenharmony_ciimport("//build/ohos.gni")
1546f34cbfSopenharmony_ciimport("../../../config.gni")
1646f34cbfSopenharmony_ciimport("../../../sensor.gni")
1746f34cbfSopenharmony_ciimport("../../../window_manager.gni")
1846f34cbfSopenharmony_ci
1946f34cbfSopenharmony_ciconfig("audio_effect_config") {
2046f34cbfSopenharmony_ci  include_dirs = [
2146f34cbfSopenharmony_ci    "include",
2246f34cbfSopenharmony_ci    "../audiostream/include",
2346f34cbfSopenharmony_ci    "../../../interfaces/inner_api/native/audiorenderer/include",
2446f34cbfSopenharmony_ci    "../../../interfaces/inner_api/native/audiocommon/include",
2546f34cbfSopenharmony_ci    "../../../interfaces/inner_api/native/audiomanager/include",
2646f34cbfSopenharmony_ci    "../../../services/audio_service/client/include",
2746f34cbfSopenharmony_ci    "../../../services/audio_service/test/example",
2846f34cbfSopenharmony_ci    "../../../services/audio_policy/server/include/service/manager",
2946f34cbfSopenharmony_ci  ]
3046f34cbfSopenharmony_ci
3146f34cbfSopenharmony_ci  cflags = [
3246f34cbfSopenharmony_ci    "-Wall",
3346f34cbfSopenharmony_ci    "-Werror",
3446f34cbfSopenharmony_ci    "-fno-access-control",
3546f34cbfSopenharmony_ci  ]
3646f34cbfSopenharmony_ci
3746f34cbfSopenharmony_ci  if (sensor_enable == true) {
3846f34cbfSopenharmony_ci    cflags += [ "-DSENSOR_ENABLE" ]
3946f34cbfSopenharmony_ci  }
4046f34cbfSopenharmony_ci
4146f34cbfSopenharmony_ci  if (window_manager_enable == true) {
4246f34cbfSopenharmony_ci    cflags += [ "-DWINDOW_MANAGER_ENABLE" ]
4346f34cbfSopenharmony_ci  }
4446f34cbfSopenharmony_ci}
4546f34cbfSopenharmony_ci
4646f34cbfSopenharmony_ciconfig("audio_effect_integration_config") {
4746f34cbfSopenharmony_ci  include_dirs = [ "../../../interfaces/inner_api/native/audiocommon/include" ]
4846f34cbfSopenharmony_ci}
4946f34cbfSopenharmony_ci
5046f34cbfSopenharmony_ciohos_shared_library("audio_effect") {
5146f34cbfSopenharmony_ci  branch_protector_ret = "pac_ret"
5246f34cbfSopenharmony_ci  sanitize = {
5346f34cbfSopenharmony_ci    cfi = true
5446f34cbfSopenharmony_ci    cfi_cross_dso = true
5546f34cbfSopenharmony_ci    cfi_vcall_icall_only = true
5646f34cbfSopenharmony_ci    debug = false
5746f34cbfSopenharmony_ci  }
5846f34cbfSopenharmony_ci  install_enable = true
5946f34cbfSopenharmony_ci
6046f34cbfSopenharmony_ci  configs = [ ":audio_effect_config" ]
6146f34cbfSopenharmony_ci
6246f34cbfSopenharmony_ci  sources = [
6346f34cbfSopenharmony_ci    "src/audio_effect_chain.cpp",
6446f34cbfSopenharmony_ci    "src/audio_effect_chain_adapter.cpp",
6546f34cbfSopenharmony_ci    "src/audio_effect_chain_manager.cpp",
6646f34cbfSopenharmony_ci    "src/audio_effect_hdi_param.cpp",
6746f34cbfSopenharmony_ci    "src/audio_effect_rotation.cpp",
6846f34cbfSopenharmony_ci    "src/audio_effect_volume.cpp",
6946f34cbfSopenharmony_ci    "src/audio_enhance_chain.cpp",
7046f34cbfSopenharmony_ci    "src/audio_enhance_chain_adapter.cpp",
7146f34cbfSopenharmony_ci    "src/audio_enhance_chain_manager.cpp",
7246f34cbfSopenharmony_ci    "src/audio_head_tracker.cpp",
7346f34cbfSopenharmony_ci  ]
7446f34cbfSopenharmony_ci
7546f34cbfSopenharmony_ci  deps = [
7646f34cbfSopenharmony_ci    "../../../services/audio_policy:audio_setting_provider",
7746f34cbfSopenharmony_ci    "../audioutils:audio_utils",
7846f34cbfSopenharmony_ci  ]
7946f34cbfSopenharmony_ci
8046f34cbfSopenharmony_ci  external_deps = [
8146f34cbfSopenharmony_ci    "c_utils:utils",
8246f34cbfSopenharmony_ci    "data_share:datashare_common",
8346f34cbfSopenharmony_ci    "data_share:datashare_consumer",
8446f34cbfSopenharmony_ci    "drivers_interface_audio:libeffect_proxy_1.0",
8546f34cbfSopenharmony_ci    "hdf_core:libhdf_utils",
8646f34cbfSopenharmony_ci    "hilog:libhilog",
8746f34cbfSopenharmony_ci    "ipc:ipc_single",
8846f34cbfSopenharmony_ci    "media_foundation:media_monitor_client",
8946f34cbfSopenharmony_ci    "os_account:os_account_innerkits",
9046f34cbfSopenharmony_ci    "pulseaudio:pulse",
9146f34cbfSopenharmony_ci    "samgr:samgr_proxy",
9246f34cbfSopenharmony_ci  ]
9346f34cbfSopenharmony_ci
9446f34cbfSopenharmony_ci  if (sensor_enable == true) {
9546f34cbfSopenharmony_ci    external_deps += [ "sensor:sensor_interface_native" ]
9646f34cbfSopenharmony_ci  }
9746f34cbfSopenharmony_ci
9846f34cbfSopenharmony_ci  version_script = "../../../audio_framework.versionscript"
9946f34cbfSopenharmony_ci
10046f34cbfSopenharmony_ci  part_name = "audio_framework"
10146f34cbfSopenharmony_ci  subsystem_name = "multimedia"
10246f34cbfSopenharmony_ci}
10346f34cbfSopenharmony_ci
10446f34cbfSopenharmony_ciohos_static_library("audio_effect_integration") {
10546f34cbfSopenharmony_ci  sanitize = {
10646f34cbfSopenharmony_ci    cfi = true
10746f34cbfSopenharmony_ci    cfi_cross_dso = true
10846f34cbfSopenharmony_ci    cfi_vcall_icall_only = true
10946f34cbfSopenharmony_ci    debug = false
11046f34cbfSopenharmony_ci  }
11146f34cbfSopenharmony_ci
11246f34cbfSopenharmony_ci  public_configs = [ ":audio_effect_integration_config" ]
11346f34cbfSopenharmony_ci
11446f34cbfSopenharmony_ci  part_name = "audio_framework"
11546f34cbfSopenharmony_ci  subsystem_name = "multimedia"
11646f34cbfSopenharmony_ci}
117