• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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")
16
17config("audio_config") {
18  include_dirs = [
19    "../audiocapturer/include",
20    "../audiorenderer/include",
21    "../../../interfaces/inner_api/native/audiocommon/include",
22    "../../../interfaces/inner_api/native/audiocapturer/include",
23    "../../../interfaces/inner_api/native/audiomanager/include",
24    "../../../interfaces/inner_api/native/audiorenderer/include",
25    "../../../interfaces/inner_api/native/audiostream/include",
26    "../../../services/audio_service/client/include",
27  ]
28
29  cflags = [
30    "-Wall",
31    "-Werror",
32  ]
33}
34
35ohos_shared_library("ohaudio") {
36  sanitize = {
37    cfi = true
38    cfi_cross_dso = true
39    debug = false
40    blocklist = "../../../cfi_blocklist.txt"
41  }
42  include_dirs = [
43    "../../../interfaces/kits/c/",
44    "../../../interfaces/kits/c/common/",
45    "../../../interfaces/kits/c/audio_renderer/",
46    "../../../interfaces/kits/c/audio_capturer/",
47  ]
48
49  configs = [ ":audio_config" ]
50
51  sources = [
52    "./OHAudioCapturer.cpp",
53    "./OHAudioRenderer.cpp",
54    "./OHAudioStreamBuilder.cpp",
55  ]
56
57  deps = [
58    "../audiocapturer:audio_capturer",
59    "../audiorenderer:audio_renderer",
60  ]
61  cflags = [ "-Werror" ]
62
63  external_deps = [ "hilog:libhilog" ]
64
65  innerapi_tags = [ "ndk" ]
66
67  output_name = "ohaudio"
68  output_extension = "so"
69  subsystem_name = "multimedia"
70  part_name = "audio_framework"
71}
72
73group("oh_audio_renderer_test_packages") {
74  deps = [
75    ":oh_audio_capturer_test",
76    ":oh_audio_renderer_test",
77  ]
78}
79
80ohos_executable("oh_audio_capturer_test") {
81  install_enable = false
82
83  include_dirs = [
84    "../../../interfaces/kits/c/",
85    "../../../interfaces/kits/c/common/",
86    "../../../interfaces/kits/c/audio_renderer/",
87    "../../../interfaces/kits/c/audio_capturer/",
88  ]
89
90  sources = [ "test/example/oh_audio_capturer_test.cpp" ]
91
92  configs = [ ":audio_config" ]
93
94  deps = [ ":ohaudio" ]
95
96  external_deps = [ "hilog:libhilog" ]
97
98  part_name = "audio_framework"
99  subsystem_name = "multimedia"
100}
101
102ohos_executable("oh_audio_renderer_test") {
103  install_enable = false
104
105  include_dirs = [
106    "../../../interfaces/kits/c/",
107    "../../../interfaces/kits/c/common/",
108    "../../../interfaces/kits/c/audio_renderer/",
109    "../../../interfaces/kits/c/audio_capturer/",
110  ]
111
112  sources = [ "test/example/oh_audio_renderer_test.cpp" ]
113
114  configs = [ ":audio_config" ]
115
116  deps = [ ":ohaudio" ]
117
118  external_deps = [ "hilog:libhilog" ]
119
120  part_name = "audio_framework"
121  subsystem_name = "multimedia"
122}
123