• 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/test.gni")
15
16module_output_path = "multimedia_audio_framework/audio_opensles"
17pulseaudio_dir = "//third_party/pulseaudio"
18opensles_dir = "//third_party/openSLES"
19
20config("audio_renderer_config") {
21  include_dirs = [
22    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiorenderer/include",
23    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocapturer/include",
24    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
25    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiostream/include",
26    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager/include",
27    "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include",
28    "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include",
29    "//foundation/multimedia/audio_framework/frameworks/native/audiopolicy/include",
30    "//foundation/multimedia/audio_framework/services/audio_service/client/include",
31    "//foundation/multimedia/audio_framework/services/audio_service/test/example",
32    "//commonlibrary/c_utils/base/include",
33    "$pulseaudio_dir/src",
34    "$pulseaudio_dir/confgure/src",
35  ]
36
37  cflags = [
38    "-Wall",
39    "-Werror",
40  ]
41}
42
43config("audio_opensles_config") {
44  include_dirs = [
45    "//foundation/multimedia/audio_framework/frameworks/native/opensles/include",
46    "$opensles_dir/api/1.0.1",
47  ]
48}
49
50ohos_unittest("audio_opensles_unit_test") {
51  module_out_path = module_output_path
52  include_dirs = [
53    "//foundation/multimedia/audio_framework/frameworks/native/audiopolicy/include",
54    "./include",
55  ]
56
57  configs = [
58    ":audio_opensles_config",
59    ":audio_renderer_config",
60  ]
61
62  sources = [ "src/audio_opensles_unit_test.cpp" ]
63
64  deps = [ "//foundation/multimedia/audio_framework/frameworks/native/opensles:opensles" ]
65
66  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
67
68  resource_config_file = "//foundation/multimedia/audio_framework/test/resource/audio_renderer/ohos_test.xml"
69}
70