• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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")
16pulseaudio_dir = "//third_party/pulseaudio"
17config("audio_utils_public_config") {
18  include_dirs = [ "./include" ]
19}
20
21ohos_shared_library("audio_utils") {
22  sanitize = {
23    cfi = true
24    debug = false
25    blocklist = "../../../cfi_blocklist.txt"
26  }
27  public_configs = [ ":audio_utils_public_config" ]
28  install_enable = true
29  include_dirs = [
30    "./include",
31    "../../../interfaces/inner_api/native/audiocommon/include/",
32    "../../..//services/audio_service/client/include",
33  ]
34
35  sources = [
36    "./src/audio_channel_blend.cpp",
37    "./src/audio_speed.cpp",
38    "./src/audio_utils.cpp",
39    "./src/volume_ramp.cpp",
40  ]
41
42  external_deps = [
43    "access_token:libaccesstoken_sdk",
44    "access_token:libtokenid_sdk",
45    "hicollie:libhicollie",
46    "hilog:libhilog",
47    "hitrace:hitrace_meter",
48    "init:libbegetutil",
49    "ipc:ipc_single",
50  ]
51
52  if (sonic_enable == true) {
53    include_dirs += [ "$pulseaudio_dir/sonic" ]
54    deps = [ "$pulseaudio_dir/sonic:sonic" ]
55  }
56
57  defines = []
58  if (audio_framework_feature_hitrace_enable) {
59    defines += [ "FEATURE_HITRACE_METER" ]
60    external_deps += [ "hitrace:hitrace_meter" ]
61  }
62
63  subsystem_name = "multimedia"
64  innerapi_tags = [ "platformsdk_indirect" ]
65  part_name = "audio_framework"
66}
67