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") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 21 | visibility = [ "*" ] |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 22 | 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 | |
| 37 | rtc_source_set("audio_decoder_isac") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 38 | visibility = [ "*" ] |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 39 | 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 | |
| 54 | config("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 | |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 69 | rtc_static_library("audio_encoder_isac_fix") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 70 | visibility = [ "*" ] |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 71 | sources = [ |
| 72 | "audio_encoder_isac_fix.cc", |
| 73 | "audio_encoder_isac_fix.h", |
| 74 | ] |
| 75 | deps = [ |
| 76 | "..:audio_codecs_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 77 | "../..:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 78 | "../../..:webrtc_common", |
| 79 | "../../../modules/audio_coding:isac_fix", |
| 80 | "../../../rtc_base:rtc_base_approved", |
| 81 | ] |
| 82 | } |
| 83 | |
| 84 | rtc_static_library("audio_decoder_isac_fix") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 85 | visibility = [ "*" ] |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 86 | sources = [ |
| 87 | "audio_decoder_isac_fix.cc", |
| 88 | "audio_decoder_isac_fix.h", |
| 89 | ] |
| 90 | deps = [ |
| 91 | "..:audio_codecs_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 92 | "../..:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 93 | "../../..:webrtc_common", |
| 94 | "../../../modules/audio_coding:isac_fix", |
| 95 | "../../../rtc_base:rtc_base_approved", |
| 96 | ] |
| 97 | } |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 98 | |
| 99 | rtc_static_library("audio_encoder_isac_float") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 100 | visibility = [ "*" ] |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 101 | sources = [ |
| 102 | "audio_encoder_isac_float.cc", |
| 103 | "audio_encoder_isac_float.h", |
| 104 | ] |
| 105 | deps = [ |
| 106 | "..:audio_codecs_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 107 | "../..:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 108 | "../../..:webrtc_common", |
| 109 | "../../../modules/audio_coding:isac", |
| 110 | "../../../rtc_base:rtc_base_approved", |
| 111 | ] |
| 112 | } |
| 113 | |
| 114 | rtc_static_library("audio_decoder_isac_float") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame^] | 115 | visibility = [ "*" ] |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 116 | sources = [ |
| 117 | "audio_decoder_isac_float.cc", |
| 118 | "audio_decoder_isac_float.h", |
| 119 | ] |
| 120 | deps = [ |
| 121 | "..:audio_codecs_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 122 | "../..:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 123 | "../../..:webrtc_common", |
| 124 | "../../../modules/audio_coding:isac", |
| 125 | "../../../rtc_base:rtc_base_approved", |
| 126 | ] |
| 127 | } |