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