diff options
author | Max <ikj1234i@yahoo.com> | 2017-10-11 16:28:32 -0400 |
---|---|---|
committer | Max <ikj1234i@yahoo.com> | 2017-10-11 16:28:32 -0400 |
commit | 15f0acfa1794533230f42ee2ec315ce8a610a6fa (patch) | |
tree | a8b7ccda9cc3bfeeb27d6264c07a6b4fa0daa385 | |
parent | 37f2c3bbfc09bca304236b98bec1e85ea3e15c18 (diff) |
patch to fix compile errors thx Graham
-rw-r--r-- | op25/gr-op25_repeater/lib/ambe_encoder.cc | 4 | ||||
-rw-r--r-- | op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc | 2 | ||||
-rw-r--r-- | op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.cc | 4 | ||||
-rw-r--r-- | op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.h | 2 | ||||
-rw-r--r-- | op25/gr-op25_repeater/lib/imbe_vocoder/tbls.cc | 4 | ||||
-rw-r--r-- | op25/gr-op25_repeater/lib/imbe_vocoder/tbls.h | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/op25/gr-op25_repeater/lib/ambe_encoder.cc b/op25/gr-op25_repeater/lib/ambe_encoder.cc index c425211..0bccb3e 100644 --- a/op25/gr-op25_repeater/lib/ambe_encoder.cc +++ b/op25/gr-op25_repeater/lib/ambe_encoder.cc @@ -27,7 +27,7 @@ #include <sys/stat.h> #include <fcntl.h> -#include <math.h> +#include <cmath> #include "imbe_vocoder/imbe_vocoder.h" #include "ambe3600x2250_const.h" @@ -555,7 +555,7 @@ ambe_encoder::ambe_encoder(void) if (gfp) { float gain_adj = 0.0; sscanf(gfp, "%f", &gain_adj); - if (!isnan(gain_adj)) + if (!std::isnan(gain_adj)) d_gain_adjust = gain_adj; } } diff --git a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc index ed3018c..766652d 100644 --- a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc +++ b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc @@ -268,7 +268,7 @@ gardner_costas_cc_impl::general_work (int noutput_items, #else float symbol_error = ((sgn(interp_samp) - sgn(d_last_sample)) * conj(interp_samp_mid)).real(); #endif - if (isnan(symbol_error)) symbol_error = 0.0; + if (std::isnan(symbol_error)) symbol_error = 0.0; if (symbol_error < -1.0) symbol_error = -1.0; if (symbol_error > 1.0) symbol_error = 1.0; diff --git a/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.cc b/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.cc index 1bfa300..853c8aa 100644 --- a/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.cc +++ b/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.cc @@ -39,7 +39,7 @@ // Pointer to bits allocation array // //----------------------------------------------------------------------------- -const Word16 *get_bit_allocation_arr(Word16 num_harms) +const UWord16 *get_bit_allocation_arr(Word16 num_harms) { Word16 offset_in_word, index; @@ -70,7 +70,7 @@ const Word16 *get_bit_allocation_arr(Word16 num_harms) //----------------------------------------------------------------------------- void get_bit_allocation(Word16 num_harms, Word16 *ptr) { - const Word16 *bat_ptr; + const UWord16 *bat_ptr; Word16 i, tmp; bat_ptr = get_bit_allocation_arr(num_harms); diff --git a/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.h b/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.h index dca74ee..3cade16 100644 --- a/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.h +++ b/op25/gr-op25_repeater/lib/imbe_vocoder/aux_sub.h @@ -39,7 +39,7 @@ // Pointer to bits allocation array
//
//-----------------------------------------------------------------------------
-const Word16 *get_bit_allocation_arr(Word16 num_harms);
+const UWord16 *get_bit_allocation_arr(Word16 num_harms); //-----------------------------------------------------------------------------
// PURPOSE:
diff --git a/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.cc b/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.cc index fb9ccf8..7befab7 100644 --- a/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.cc +++ b/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.cc @@ -27,7 +27,7 @@ // Bit allocation and ancillary tables
//
//-----------------------------------------------------------------------------
-const Word16 bit_allocation_tbl[] =
+const UWord16 bit_allocation_tbl[] = {
0xA999, 0x9987,
0x9988, 0x8976, 0x5000,
@@ -89,7 +89,7 @@ const Word16 bit_allocation_offset_tbl[] = // Log Magnitude Prediction Residual Block Length
//
//-----------------------------------------------------------------------------
-const Word32 lmprbl_tbl[] =
+const UWord32 lmprbl_tbl[] = {
0x11122200,
0x11222200,
diff --git a/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.h b/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.h index f83387b..fe2fe2e 100644 --- a/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.h +++ b/op25/gr-op25_repeater/lib/imbe_vocoder/tbls.h @@ -28,7 +28,7 @@ // Bit allocation and ancillary tables
//
//-----------------------------------------------------------------------------
-extern const Word16 bit_allocation_tbl[];
+extern const UWord16 bit_allocation_tbl[]; extern const Word16 bit_allocation_offset_tbl[];
//-----------------------------------------------------------------------------
@@ -36,7 +36,7 @@ extern const Word16 bit_allocation_offset_tbl[]; // Log Magnitude Prediction Residual Block Length
//
//-----------------------------------------------------------------------------
-extern const Word32 lmprbl_tbl[];
+extern const UWord32 lmprbl_tbl[]; //-----------------------------------------------------------------------------
//
|