patch to fix compile errors thx Graham

This commit is contained in:
Max 2017-10-11 16:28:32 -04:00
parent 37f2c3bbfc
commit 15f0acfa17
6 changed files with 10 additions and 10 deletions

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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);

View File

@ -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:

View File

@ -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,

View File

@ -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[];
//-----------------------------------------------------------------------------
//