• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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")
15
16pulseaudio_dir = "//third_party/pulseaudio"
17
18config("audio_renderer_config") {
19  include_dirs = [
20    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiorenderer/include",
21    "//foundation/multimedia/audio_standard/frameworks/native/audiorenderer/include",
22    "//foundation/multimedia/audio_standard/frameworks/native/audiosession/include",
23    "//foundation/multimedia/audio_standard/frameworks/native/audiostream/include",
24    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocommon/include",
25    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiomanager/include",
26    "//foundation/multimedia/audio_standard/services/include",
27    "//foundation/multimedia/audio_standard/services/include/audio_service/client",
28    "//foundation/multimedia/audio_standard/services/test",
29    "//utils/native/base/include",
30    "$pulseaudio_dir/src",
31    "$pulseaudio_dir/confgure/src",
32  ]
33
34  cflags = [
35    "-Wall",
36    "-Werror",
37  ]
38}
39
40ohos_shared_library("audio_renderer") {
41  install_enable = true
42
43  configs = [ ":audio_renderer_config" ]
44
45  sources = [ "//foundation/multimedia/audio_standard/frameworks/native/audiorenderer/src/audio_renderer.cpp" ]
46
47  deps = [
48    "//foundation/multimedia/audio_standard/frameworks/native/audiopolicy:audio_policy_client",
49    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiomanager:audio_client",
50    "//utils/native/base:utils",
51  ]
52
53  public_configs = [ ":audio_external_library_config" ]
54
55  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
56
57  part_name = "multimedia_audio_standard"
58  subsystem_name = "multimedia"
59}
60
61ohos_executable("audio_renderer_test") {
62  install_enable = false
63
64  sources = [ "//foundation/multimedia/audio_standard/services/test/audio_renderer_test.cpp" ]
65
66  configs = [ ":audio_renderer_config" ]
67
68  deps = [ ":audio_renderer" ]
69
70  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
71
72  part_name = "multimedia_audio_standard"
73  subsystem_name = "multimedia"
74}
75
76ohos_executable("audio_render_mode_callback_test") {
77  install_enable = false
78
79  sources = [ "//foundation/multimedia/audio_standard/services/test/audio_render_mode_callback_test.cpp" ]
80
81  configs = [ ":audio_renderer_config" ]
82
83  deps = [ ":audio_renderer" ]
84
85  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
86
87  part_name = "multimedia_audio_standard"
88  subsystem_name = "multimedia"
89}
90
91ohos_executable("audio_voip_test") {
92  install_enable = false
93
94  sources = [
95    "//foundation/multimedia/audio_standard/services/test/audio_voip_test.cpp",
96  ]
97
98  include_dirs = [
99    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer/include",
100    "//foundation/multimedia/audio_standard/frameworks/native/audiocapturer/include",
101    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiorenderer/include",
102    "//foundation/multimedia/audio_standard/frameworks/native/audiorenderer/include",
103    "//foundation/multimedia/audio_standard/frameworks/native/audiosession/include",
104    "//foundation/multimedia/audio_standard/frameworks/native/audiostream/include",
105    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocommon/include",
106    "//foundation/multimedia/audio_standard/services/include",
107    "//foundation/multimedia/audio_standard/services/include/audio_service/client",
108    "//utils/native/base/include",
109    "$pulseaudio_dir/src",
110    "$pulseaudio_dir/confgure/src",
111  ]
112
113  cflags = [
114    "-Wall",
115    "-Werror",
116  ]
117
118  configs = [ ":audio_renderer_config" ]
119
120  deps = [
121    ":audio_renderer",
122    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer:audio_capturer",
123  ]
124
125  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
126
127  part_name = "multimedia_audio_standard"
128  subsystem_name = "multimedia"
129}
130
131ohos_executable("audio_interrupt_test") {
132  install_enable = false
133
134  sources = [ "//foundation/multimedia/audio_standard/services/test/audio_interrupt_test.cpp" ]
135
136  configs = [ ":audio_renderer_config" ]
137
138  deps = [
139    ":audio_renderer",
140    "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiomanager:audio_client",
141  ]
142
143  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
144
145  part_name = "multimedia_audio_standard"
146  subsystem_name = "multimedia"
147}
148
149ohos_executable("interrupt_multi_renderer_test") {
150  install_enable = false
151
152  sources = [ "//foundation/multimedia/audio_standard/services/test/interrupt_multi_renderer_test.cpp" ]
153
154  configs = [ ":audio_renderer_config" ]
155
156  deps = [ ":audio_renderer" ]
157
158  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
159
160  part_name = "multimedia_audio_standard"
161  subsystem_name = "multimedia"
162}
163
164config("audio_external_library_config") {
165  include_dirs = [ "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiorenderer/include" ]
166}
167