# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../../config.gni") config("audio_utils_public_config") { include_dirs = [ "./include" ] cflags_cc = [ "-std=c++20" ] } ohos_shared_library("audio_utils") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false } public_configs = [ ":audio_utils_public_config" ] install_enable = true include_dirs = [ "./include", "../../../interfaces/inner_api/native/audiocommon/include/", "../../../services/audio_service/client/include", ] sources = [ "./src/audio_channel_blend.cpp", "./src/audio_speed.cpp", "./src/audio_utils.cpp", "./src/volume_ramp.cpp", ] public_external_deps = [ "bounds_checking_function:libsec_shared" ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libprivacy_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "hicollie:libhicollie", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_single", ] if (sonic_enable == true) { external_deps += [ "pulseaudio:sonic" ] } defines = [] if (audio_framework_feature_hitrace_enable) { defines += [ "FEATURE_HITRACE_METER" ] external_deps += [ "hitrace:hitrace_meter" ] } if (build_variant == "user") { defines += [ "AUDIO_BUILD_VARIANT_USER" ] } else if (build_variant == "root") { defines += [ "AUDIO_BUILD_VARIANT_ROOT" ] } subsystem_name = "multimedia" innerapi_tags = [ "platformsdk_indirect" ] part_name = "audio_framework" }