146f34cbfSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 246f34cbfSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 346f34cbfSopenharmony_ci# you may not use this file except in compliance with the License. 446f34cbfSopenharmony_ci# You may obtain a copy of the License at 546f34cbfSopenharmony_ci# 646f34cbfSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 746f34cbfSopenharmony_ci# 846f34cbfSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 946f34cbfSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1046f34cbfSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1146f34cbfSopenharmony_ci# See the License for the specific language governing permissions and 1246f34cbfSopenharmony_ci# limitations under the License. 1346f34cbfSopenharmony_ci 1446f34cbfSopenharmony_ciimport("//build/ohos.gni") 1546f34cbfSopenharmony_ciimport("../../../config.gni") 1646f34cbfSopenharmony_ci 1746f34cbfSopenharmony_ciconfig("audio_config") { 1846f34cbfSopenharmony_ci include_dirs = [ 1946f34cbfSopenharmony_ci "../audiocapturer/include", 2046f34cbfSopenharmony_ci "../audiorenderer/include", 2146f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocommon/include", 2246f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocapturer/include", 2346f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiomanager/include", 2446f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiorenderer/include", 2546f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiostream/include", 2646f34cbfSopenharmony_ci "../../../services/audio_service/client/include", 2746f34cbfSopenharmony_ci ] 2846f34cbfSopenharmony_ci 2946f34cbfSopenharmony_ci cflags = [ 3046f34cbfSopenharmony_ci "-Wall", 3146f34cbfSopenharmony_ci "-Werror", 3246f34cbfSopenharmony_ci ] 3346f34cbfSopenharmony_ci} 3446f34cbfSopenharmony_ci 3546f34cbfSopenharmony_ciohos_shared_library("ohaudio") { 3646f34cbfSopenharmony_ci sanitize = { 3746f34cbfSopenharmony_ci cfi = true 3846f34cbfSopenharmony_ci cfi_cross_dso = true 3946f34cbfSopenharmony_ci cfi_vcall_icall_only = true 4046f34cbfSopenharmony_ci debug = false 4146f34cbfSopenharmony_ci } 4246f34cbfSopenharmony_ci include_dirs = [ 4346f34cbfSopenharmony_ci "../../../interfaces/kits/c/", 4446f34cbfSopenharmony_ci "../../../interfaces/kits/c/common/", 4546f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_renderer/", 4646f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_capturer/", 4746f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_manager/", 4846f34cbfSopenharmony_ci "../../native/audiopolicy/include/", 4946f34cbfSopenharmony_ci ] 5046f34cbfSopenharmony_ci 5146f34cbfSopenharmony_ci configs = [ ":audio_config" ] 5246f34cbfSopenharmony_ci 5346f34cbfSopenharmony_ci sources = [ 5446f34cbfSopenharmony_ci "./OHAudioCapturer.cpp", 5546f34cbfSopenharmony_ci "./OHAudioDeviceDescriptor.cpp", 5646f34cbfSopenharmony_ci "./OHAudioManager.cpp", 5746f34cbfSopenharmony_ci "./OHAudioRenderer.cpp", 5846f34cbfSopenharmony_ci "./OHAudioRoutingManager.cpp", 5946f34cbfSopenharmony_ci "./OHAudioSessionManager.cpp", 6046f34cbfSopenharmony_ci "./OHAudioStreamBuilder.cpp", 6146f34cbfSopenharmony_ci ] 6246f34cbfSopenharmony_ci 6346f34cbfSopenharmony_ci deps = [ 6446f34cbfSopenharmony_ci "../../../services/audio_service:audio_client", 6546f34cbfSopenharmony_ci "../audiocapturer:audio_capturer", 6646f34cbfSopenharmony_ci "../audiorenderer:audio_renderer", 6746f34cbfSopenharmony_ci ] 6846f34cbfSopenharmony_ci cflags = [ "-Werror" ] 6946f34cbfSopenharmony_ci 7046f34cbfSopenharmony_ci external_deps = [ 7146f34cbfSopenharmony_ci "c_utils:utils", 7246f34cbfSopenharmony_ci "hilog:libhilog", 7346f34cbfSopenharmony_ci "init:libbegetutil", 7446f34cbfSopenharmony_ci ] 7546f34cbfSopenharmony_ci 7646f34cbfSopenharmony_ci innerapi_tags = [ "ndk" ] 7746f34cbfSopenharmony_ci 7846f34cbfSopenharmony_ci output_name = "ohaudio" 7946f34cbfSopenharmony_ci output_extension = "so" 8046f34cbfSopenharmony_ci subsystem_name = "multimedia" 8146f34cbfSopenharmony_ci part_name = "audio_framework" 8246f34cbfSopenharmony_ci} 8346f34cbfSopenharmony_ci 8446f34cbfSopenharmony_cigroup("oh_audio_renderer_test_packages") { 8546f34cbfSopenharmony_ci deps = [ 8646f34cbfSopenharmony_ci ":oh_audio_capturer_test", 8746f34cbfSopenharmony_ci ":oh_audio_renderer_test", 8846f34cbfSopenharmony_ci ":oh_audio_session_manager_test", 8946f34cbfSopenharmony_ci ] 9046f34cbfSopenharmony_ci} 9146f34cbfSopenharmony_ci 9246f34cbfSopenharmony_ciohos_executable("oh_audio_capturer_test") { 9346f34cbfSopenharmony_ci install_enable = false 9446f34cbfSopenharmony_ci 9546f34cbfSopenharmony_ci include_dirs = [ 9646f34cbfSopenharmony_ci "../../../interfaces/kits/c/", 9746f34cbfSopenharmony_ci "../../../interfaces/kits/c/common/", 9846f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_renderer/", 9946f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_capturer/", 10046f34cbfSopenharmony_ci ] 10146f34cbfSopenharmony_ci 10246f34cbfSopenharmony_ci sources = [ "test/example/oh_audio_capturer_test.cpp" ] 10346f34cbfSopenharmony_ci 10446f34cbfSopenharmony_ci configs = [ ":audio_config" ] 10546f34cbfSopenharmony_ci 10646f34cbfSopenharmony_ci deps = [ ":ohaudio" ] 10746f34cbfSopenharmony_ci 10846f34cbfSopenharmony_ci external_deps = [ "hilog:libhilog" ] 10946f34cbfSopenharmony_ci 11046f34cbfSopenharmony_ci part_name = "audio_framework" 11146f34cbfSopenharmony_ci subsystem_name = "multimedia" 11246f34cbfSopenharmony_ci} 11346f34cbfSopenharmony_ci 11446f34cbfSopenharmony_ciohos_executable("oh_audio_capturer_lowlatency_test") { 11546f34cbfSopenharmony_ci install_enable = false 11646f34cbfSopenharmony_ci 11746f34cbfSopenharmony_ci include_dirs = [ 11846f34cbfSopenharmony_ci "../../../interfaces/kits/c/", 11946f34cbfSopenharmony_ci "../../../interfaces/kits/c/common/", 12046f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_renderer/", 12146f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_capturer/", 12246f34cbfSopenharmony_ci "../audioutils/include", 12346f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocommon/include", 12446f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiomanager/include", 12546f34cbfSopenharmony_ci "../../../services/audio_service/client/include", 12646f34cbfSopenharmony_ci ] 12746f34cbfSopenharmony_ci 12846f34cbfSopenharmony_ci sources = [ "test/example/oh_audio_capturer_lowlatency_test.cpp" ] 12946f34cbfSopenharmony_ci 13046f34cbfSopenharmony_ci configs = [ ":audio_config" ] 13146f34cbfSopenharmony_ci 13246f34cbfSopenharmony_ci deps = [ 13346f34cbfSopenharmony_ci ":ohaudio", 13446f34cbfSopenharmony_ci "../../../services/audio_service:audio_client", 13546f34cbfSopenharmony_ci "../audioutils:audio_utils", 13646f34cbfSopenharmony_ci ] 13746f34cbfSopenharmony_ci 13846f34cbfSopenharmony_ci external_deps = [ 13946f34cbfSopenharmony_ci "bounds_checking_function:libsec_shared", 14046f34cbfSopenharmony_ci "c_utils:utils", 14146f34cbfSopenharmony_ci "hilog:libhilog", 14246f34cbfSopenharmony_ci "init:libbegetutil", 14346f34cbfSopenharmony_ci ] 14446f34cbfSopenharmony_ci 14546f34cbfSopenharmony_ci part_name = "audio_framework" 14646f34cbfSopenharmony_ci subsystem_name = "multimedia" 14746f34cbfSopenharmony_ci} 14846f34cbfSopenharmony_ci 14946f34cbfSopenharmony_ciohos_executable("oh_audio_renderer_test") { 15046f34cbfSopenharmony_ci install_enable = false 15146f34cbfSopenharmony_ci 15246f34cbfSopenharmony_ci include_dirs = [ 15346f34cbfSopenharmony_ci "../../../interfaces/kits/c/", 15446f34cbfSopenharmony_ci "../../../interfaces/kits/c/common/", 15546f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_renderer/", 15646f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_capturer/", 15746f34cbfSopenharmony_ci ] 15846f34cbfSopenharmony_ci 15946f34cbfSopenharmony_ci sources = [ "test/example/oh_audio_renderer_test.cpp" ] 16046f34cbfSopenharmony_ci 16146f34cbfSopenharmony_ci configs = [ ":audio_config" ] 16246f34cbfSopenharmony_ci 16346f34cbfSopenharmony_ci deps = [ ":ohaudio" ] 16446f34cbfSopenharmony_ci 16546f34cbfSopenharmony_ci external_deps = [ "hilog:libhilog" ] 16646f34cbfSopenharmony_ci 16746f34cbfSopenharmony_ci part_name = "audio_framework" 16846f34cbfSopenharmony_ci subsystem_name = "multimedia" 16946f34cbfSopenharmony_ci} 17046f34cbfSopenharmony_ci 17146f34cbfSopenharmony_ciohos_executable("oh_audio_session_manager_test") { 17246f34cbfSopenharmony_ci stack_protector_ret = true 17346f34cbfSopenharmony_ci 17446f34cbfSopenharmony_ci sanitize = { 17546f34cbfSopenharmony_ci cfi = true 17646f34cbfSopenharmony_ci cfi_cross_dso = true 17746f34cbfSopenharmony_ci cfi_vcall_icall_only = true 17846f34cbfSopenharmony_ci debug = false 17946f34cbfSopenharmony_ci } 18046f34cbfSopenharmony_ci 18146f34cbfSopenharmony_ci install_enable = false 18246f34cbfSopenharmony_ci 18346f34cbfSopenharmony_ci include_dirs = [ 18446f34cbfSopenharmony_ci "../../../interfaces/kits/c/", 18546f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_manager/", 18646f34cbfSopenharmony_ci "../../../interfaces/kits/c/common/", 18746f34cbfSopenharmony_ci "../../../interfaces/kits/c/audio_renderer/", 18846f34cbfSopenharmony_ci ] 18946f34cbfSopenharmony_ci 19046f34cbfSopenharmony_ci sources = [ "test/example/oh_audio_session_manager_test.cpp" ] 19146f34cbfSopenharmony_ci 19246f34cbfSopenharmony_ci configs = [ ":audio_config" ] 19346f34cbfSopenharmony_ci 19446f34cbfSopenharmony_ci deps = [ 19546f34cbfSopenharmony_ci ":ohaudio", 19646f34cbfSopenharmony_ci "../../../services/audio_service:audio_client", 19746f34cbfSopenharmony_ci "../audioutils:audio_utils", 19846f34cbfSopenharmony_ci ] 19946f34cbfSopenharmony_ci 20046f34cbfSopenharmony_ci external_deps = [ 20146f34cbfSopenharmony_ci "bounds_checking_function:libsec_shared", 20246f34cbfSopenharmony_ci "c_utils:utils", 20346f34cbfSopenharmony_ci "hilog:libhilog", 20446f34cbfSopenharmony_ci "init:libbegetutil", 20546f34cbfSopenharmony_ci ] 20646f34cbfSopenharmony_ci 20746f34cbfSopenharmony_ci part_name = "audio_framework" 20846f34cbfSopenharmony_ci subsystem_name = "multimedia" 20946f34cbfSopenharmony_ci} 210