153a5a1b3Sopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
253a5a1b3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
353a5a1b3Sopenharmony_ci# you may not use this file except in compliance with the License.
453a5a1b3Sopenharmony_ci# You may obtain a copy of the License at
553a5a1b3Sopenharmony_ci#
653a5a1b3Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
753a5a1b3Sopenharmony_ci#
853a5a1b3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
953a5a1b3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1053a5a1b3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1153a5a1b3Sopenharmony_ci# See the License for the specific language governing permissions and
1253a5a1b3Sopenharmony_ci# limitations under the License.
1353a5a1b3Sopenharmony_ci
1453a5a1b3Sopenharmony_ciimport("//build/ohos.gni")
1553a5a1b3Sopenharmony_ci
1653a5a1b3Sopenharmony_ciconfig("speex_config") {
1753a5a1b3Sopenharmony_ci  visibility = [ ":*" ]
1853a5a1b3Sopenharmony_ci
1953a5a1b3Sopenharmony_ci  include_dirs = [
2053a5a1b3Sopenharmony_ci    "include",
2153a5a1b3Sopenharmony_ci    "libspeexdsp",
2253a5a1b3Sopenharmony_ci  ]
2353a5a1b3Sopenharmony_ci
2453a5a1b3Sopenharmony_ci  cflags = [
2553a5a1b3Sopenharmony_ci    "-Wall",
2653a5a1b3Sopenharmony_ci    "-Werror",
2753a5a1b3Sopenharmony_ci    "-Wno-sign-compare",
2853a5a1b3Sopenharmony_ci    "-Wno-unused-parameter",
2953a5a1b3Sopenharmony_ci  ]
3053a5a1b3Sopenharmony_ci}
3153a5a1b3Sopenharmony_ci
3253a5a1b3Sopenharmony_ciohos_source_set("speex_sources") {
3353a5a1b3Sopenharmony_ci  sources = [ "libspeexdsp/resample.c" ]
3453a5a1b3Sopenharmony_ci
3553a5a1b3Sopenharmony_ci  configs = [ ":speex_config" ]
3653a5a1b3Sopenharmony_ci  subsystem_name = "thirdparty"
3753a5a1b3Sopenharmony_ci  part_name = "pulseaudio"
3853a5a1b3Sopenharmony_ci}
3953a5a1b3Sopenharmony_ci
4053a5a1b3Sopenharmony_ciconfig("speexresampler_header") {
4153a5a1b3Sopenharmony_ci  include_dirs = [ "//third_party/pulseaudio/speex/include" ]
4253a5a1b3Sopenharmony_ci}
4353a5a1b3Sopenharmony_ci
4453a5a1b3Sopenharmony_ciohos_shared_library("speexresampler") {
4553a5a1b3Sopenharmony_ci  deps = [ ":speex_sources" ]
4653a5a1b3Sopenharmony_ci  innerapi_tags = [
4753a5a1b3Sopenharmony_ci    "chipsetsdk_indirect",
4853a5a1b3Sopenharmony_ci    "platformsdk_indirect",
4953a5a1b3Sopenharmony_ci  ]
5053a5a1b3Sopenharmony_ci
5153a5a1b3Sopenharmony_ci  public_configs = [ ":speexresampler_header" ]
5253a5a1b3Sopenharmony_ci  subsystem_name = "thirdparty"
5353a5a1b3Sopenharmony_ci  part_name = "pulseaudio"
5453a5a1b3Sopenharmony_ci}
55