blob: f63435c93aab33a37d0dcde393b8d864401a28cb [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 Wiberg735a8382017-10-05 11:00:38 +020022 public = [
23 "audio_encoder_isac.h",
24 ]
25 public_configs = [ ":isac_config" ]
26 if (current_cpu == "arm") {
27 deps = [
28 ":audio_encoder_isac_fix",
29 ]
30 } else {
31 deps = [
32 ":audio_encoder_isac_float",
33 ]
34 }
35}
36
37rtc_source_set("audio_decoder_isac") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000038 visibility = [ "*" ]
Karl Wiberg735a8382017-10-05 11:00:38 +020039 public = [
40 "audio_decoder_isac.h",
41 ]
42 public_configs = [ ":isac_config" ]
43 if (current_cpu == "arm") {
44 deps = [
45 ":audio_decoder_isac_fix",
46 ]
47 } else {
48 deps = [
49 ":audio_decoder_isac_float",
50 ]
51 }
52}
53
54config("isac_config") {
55 visibility = [ ":*" ]
56 if (current_cpu == "arm") {
57 defines = [
58 "WEBRTC_USE_BUILTIN_ISAC_FIX=1",
59 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0",
60 ]
61 } else {
62 defines = [
63 "WEBRTC_USE_BUILTIN_ISAC_FIX=0",
64 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1",
65 ]
66 }
67}
68
kwiberg327af332017-08-18 04:09:40 -070069rtc_static_library("audio_encoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000070 visibility = [ "*" ]
kwiberg327af332017-08-18 04:09:40 -070071 sources = [
72 "audio_encoder_isac_fix.cc",
73 "audio_encoder_isac_fix.h",
74 ]
75 deps = [
76 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070077 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070078 "../../..:webrtc_common",
79 "../../../modules/audio_coding:isac_fix",
80 "../../../rtc_base:rtc_base_approved",
81 ]
82}
83
84rtc_static_library("audio_decoder_isac_fix") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000085 visibility = [ "*" ]
kwiberg327af332017-08-18 04:09:40 -070086 sources = [
87 "audio_decoder_isac_fix.cc",
88 "audio_decoder_isac_fix.h",
89 ]
90 deps = [
91 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070092 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070093 "../../..:webrtc_common",
94 "../../../modules/audio_coding:isac_fix",
95 "../../../rtc_base:rtc_base_approved",
96 ]
97}
kwiberge57556c2017-08-21 06:11:18 -070098
99rtc_static_library("audio_encoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000100 visibility = [ "*" ]
kwiberge57556c2017-08-21 06:11:18 -0700101 sources = [
102 "audio_encoder_isac_float.cc",
103 "audio_encoder_isac_float.h",
104 ]
105 deps = [
106 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700107 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700108 "../../..:webrtc_common",
109 "../../../modules/audio_coding:isac",
110 "../../../rtc_base:rtc_base_approved",
111 ]
112}
113
114rtc_static_library("audio_decoder_isac_float") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000115 visibility = [ "*" ]
kwiberge57556c2017-08-21 06:11:18 -0700116 sources = [
117 "audio_decoder_isac_float.cc",
118 "audio_decoder_isac_float.h",
119 ]
120 deps = [
121 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700122 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700123 "../../..:webrtc_common",
124 "../../../modules/audio_coding:isac",
125 "../../../rtc_base:rtc_base_approved",
126 ]
127}