kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 1 | # 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 | |
| 9 | import("../../../webrtc.gni") |
| 10 | if (is_android) { |
| 11 | import("//build/config/android/config.gni") |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
| 14 | |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 15 | # 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 | |
| 20 | rtc_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 | |
| 36 | rtc_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 | |
| 52 | config("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 | |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 67 | rtc_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", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 74 | "../..:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 75 | "../../..:webrtc_common", |
| 76 | "../../../modules/audio_coding:isac_fix", |
| 77 | "../../../rtc_base:rtc_base_approved", |
| 78 | ] |
| 79 | } |
| 80 | |
| 81 | rtc_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", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 88 | "../..:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 89 | "../../..:webrtc_common", |
| 90 | "../../../modules/audio_coding:isac_fix", |
| 91 | "../../../rtc_base:rtc_base_approved", |
| 92 | ] |
| 93 | } |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 94 | |
| 95 | rtc_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", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 102 | "../..:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 103 | "../../..:webrtc_common", |
| 104 | "../../../modules/audio_coding:isac", |
| 105 | "../../../rtc_base:rtc_base_approved", |
| 106 | ] |
| 107 | } |
| 108 | |
| 109 | rtc_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", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 116 | "../..:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 117 | "../../..:webrtc_common", |
| 118 | "../../../modules/audio_coding:isac", |
| 119 | "../../../rtc_base:rtc_base_approved", |
| 120 | ] |
| 121 | } |