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("../../../config.gni") 16import("../../../sensor.gni") 17import("../../../window_manager.gni") 18 19config("audio_effect_config") { 20 include_dirs = [ 21 "include", 22 "../audiostream/include", 23 "../../../interfaces/inner_api/native/audiorenderer/include", 24 "../../../interfaces/inner_api/native/audiocommon/include", 25 "../../../interfaces/inner_api/native/audiomanager/include", 26 "../../../services/audio_service/client/include", 27 "../../../services/audio_service/common/include", 28 "../../../services/audio_service/test/example", 29 ] 30 31 cflags = [ 32 "-Wall", 33 "-Werror", 34 ] 35 36 if (sensor_enable == true) { 37 cflags += [ "-DSENSOR_ENABLE" ] 38 } 39 40 if (window_manager_enable == true) { 41 cflags += [ "-DWINDOW_MANAGER_ENABLE" ] 42 } 43} 44 45config("audio_effect_integration_config") { 46 include_dirs = [ "../../../interfaces/inner_api/native/audiocommon/include" ] 47} 48 49ohos_shared_library("audio_effect") { 50 branch_protector_ret = "pac_ret" 51 sanitize = { 52 cfi = true 53 cfi_cross_dso = true 54 cfi_vcall_icall_only = true 55 debug = false 56 } 57 install_enable = true 58 59 configs = [ ":audio_effect_config" ] 60 61 sources = [ 62 "src/audio_effect_chain.cpp", 63 "src/audio_effect_chain_adapter.cpp", 64 "src/audio_effect_chain_manager.cpp", 65 "src/audio_effect_hdi_param.cpp", 66 "src/audio_effect_rotation.cpp", 67 "src/audio_effect_volume.cpp", 68 "src/audio_enhance_chain.cpp", 69 "src/audio_enhance_chain_adapter.cpp", 70 "src/audio_enhance_chain_manager.cpp", 71 "src/audio_head_tracker.cpp", 72 ] 73 74 deps = [ 75 "../../../services/audio_service:audio_common", 76 "../audioutils:audio_utils", 77 ] 78 79 external_deps = [ 80 "c_utils:utils", 81 "drivers_interface_audio:libeffect_proxy_1.0", 82 "hilog:libhilog", 83 "ipc:ipc_single", 84 "media_foundation:media_monitor_client", 85 "pulseaudio:pulse", 86 ] 87 88 if (sensor_enable == true) { 89 external_deps += [ "sensor:sensor_interface_native" ] 90 } 91 92 version_script = "../../../audio_framework.versionscript" 93 94 part_name = "audio_framework" 95 subsystem_name = "multimedia" 96} 97 98ohos_static_library("audio_effect_integration") { 99 sanitize = { 100 cfi = true 101 cfi_cross_dso = true 102 cfi_vcall_icall_only = true 103 debug = false 104 } 105 106 public_configs = [ ":audio_effect_integration_config" ] 107 108 part_name = "audio_framework" 109 subsystem_name = "multimedia" 110} 111