blob: 08cabc5b020747c7ed356237705c5f83226899db [file] [log] [blame]
kwiberg327af332017-08-18 04:09:40 -07001# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../../webrtc.gni")
10if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
14
Karl Wiberg735a8382017-10-05 11:00:38 +020015# The targets with _fix and _float suffixes unconditionally use the
16# fixed-point and floating-point iSAC implementations, respectively.
17# The targets without suffixes pick one of the implementations based
18# on cleverly chosen criteria.
19
20rtc_source_set("audio_encoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000021 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020022 poisonous = [ "audio_codecs" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020023 public = [
24 "audio_encoder_isac.h",
25 ]
26 public_configs = [ ":isac_config" ]
27 if (current_cpu == "arm") {
28 deps = [
29 ":audio_encoder_isac_fix",
30 ]
31 } else {
32 deps = [
33 ":audio_encoder_isac_float",
34 ]
35 }
36}
37
38rtc_source_set("audio_decoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000039 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020040 poisonous = [ "audio_codecs" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020041 public = [
42 "audio_decoder_isac.h",
43 ]
44 public_configs = [ ":isac_config" ]
45 if (current_cpu == "arm") {
46 deps = [
47 ":audio_decoder_isac_fix",
48 ]
49 } else {
50 deps = [
51 ":audio_decoder_isac_float",
52 ]
53 }
54}
55
56config("isac_config") {
57 visibility = [ ":*" ]
58 if (current_cpu == "arm") {
59 defines = [
60 "WEBRTC_USE_BUILTIN_ISAC_FIX=1",
61 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0",
62 ]
63 } else {
64 defines = [
65 "WEBRTC_USE_BUILTIN_ISAC_FIX=0",
66 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1",
67 ]
68 }
69}
70
kwiberg327af332017-08-18 04:09:40 -070071rtc_static_library("audio_encoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000072 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020073 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070074 sources = [
75 "audio_encoder_isac_fix.cc",
76 "audio_encoder_isac_fix.h",
77 ]
78 deps = [
79 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070080 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070081 "../../..:webrtc_common",
82 "../../../modules/audio_coding:isac_fix",
83 "../../../rtc_base:rtc_base_approved",
84 ]
85}
86
87rtc_static_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000088 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020089 poisonous = [ "audio_codecs" ]
kwiberg327af332017-08-18 04:09:40 -070090 sources = [
91 "audio_decoder_isac_fix.cc",
92 "audio_decoder_isac_fix.h",
93 ]
94 deps = [
95 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070096 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070097 "../../..:webrtc_common",
98 "../../../modules/audio_coding:isac_fix",
99 "../../../rtc_base:rtc_base_approved",
100 ]
101}
kwiberge57556c2017-08-21 06:11:18 -0700102
103rtc_static_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000104 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200105 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700106 sources = [
107 "audio_encoder_isac_float.cc",
108 "audio_encoder_isac_float.h",
109 ]
110 deps = [
111 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700112 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700113 "../../..:webrtc_common",
114 "../../../modules/audio_coding:isac",
115 "../../../rtc_base:rtc_base_approved",
116 ]
117}
118
119rtc_static_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000120 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +0200121 poisonous = [ "audio_codecs" ]
kwiberge57556c2017-08-21 06:11:18 -0700122 sources = [
123 "audio_decoder_isac_float.cc",
124 "audio_decoder_isac_float.h",
125 ]
126 deps = [
127 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700128 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700129 "../../..:webrtc_common",
130 "../../../modules/audio_coding:isac",
131 "../../../rtc_base:rtc_base_approved",
132 ]
133}