blob: 5bd477d1d7eeded45ad17a7636eecaba6ea5e256 [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") {
21 public = [
22 "audio_encoder_isac.h",
23 ]
24 public_configs = [ ":isac_config" ]
25 if (current_cpu == "arm") {
26 deps = [
27 ":audio_encoder_isac_fix",
28 ]
29 } else {
30 deps = [
31 ":audio_encoder_isac_float",
32 ]
33 }
34}
35
36rtc_source_set("audio_decoder_isac") {
37 public = [
38 "audio_decoder_isac.h",
39 ]
40 public_configs = [ ":isac_config" ]
41 if (current_cpu == "arm") {
42 deps = [
43 ":audio_decoder_isac_fix",
44 ]
45 } else {
46 deps = [
47 ":audio_decoder_isac_float",
48 ]
49 }
50}
51
52config("isac_config") {
53 visibility = [ ":*" ]
54 if (current_cpu == "arm") {
55 defines = [
56 "WEBRTC_USE_BUILTIN_ISAC_FIX=1",
57 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0",
58 ]
59 } else {
60 defines = [
61 "WEBRTC_USE_BUILTIN_ISAC_FIX=0",
62 "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1",
63 ]
64 }
65}
66
kwiberg327af332017-08-18 04:09:40 -070067rtc_static_library("audio_encoder_isac_fix") {
68 sources = [
69 "audio_encoder_isac_fix.cc",
70 "audio_encoder_isac_fix.h",
71 ]
72 deps = [
73 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070074 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070075 "../../..:webrtc_common",
76 "../../../modules/audio_coding:isac_fix",
77 "../../../rtc_base:rtc_base_approved",
78 ]
79}
80
81rtc_static_library("audio_decoder_isac_fix") {
82 sources = [
83 "audio_decoder_isac_fix.cc",
84 "audio_decoder_isac_fix.h",
85 ]
86 deps = [
87 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070088 "../..:optional",
kwiberg327af332017-08-18 04:09:40 -070089 "../../..:webrtc_common",
90 "../../../modules/audio_coding:isac_fix",
91 "../../../rtc_base:rtc_base_approved",
92 ]
93}
kwiberge57556c2017-08-21 06:11:18 -070094
95rtc_static_library("audio_encoder_isac_float") {
96 sources = [
97 "audio_encoder_isac_float.cc",
98 "audio_encoder_isac_float.h",
99 ]
100 deps = [
101 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700102 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700103 "../../..:webrtc_common",
104 "../../../modules/audio_coding:isac",
105 "../../../rtc_base:rtc_base_approved",
106 ]
107}
108
109rtc_static_library("audio_decoder_isac_float") {
110 sources = [
111 "audio_decoder_isac_float.cc",
112 "audio_decoder_isac_float.h",
113 ]
114 deps = [
115 "..:audio_codecs_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700116 "../..:optional",
kwiberge57556c2017-08-21 06:11:18 -0700117 "../../..:webrtc_common",
118 "../../../modules/audio_coding:isac",
119 "../../../rtc_base:rtc_base_approved",
120 ]
121}