mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-10 03:41:16 +00:00
Merge pull request #847 in FS/freeswitch from ~PIOTRGREGOR/freeswitch:bugfix/FS-9152-freebsd-avmd-math-function to master
* commit '0a5145133b067dc47feb664c75361f2e6985d6af': FS-9152 [avmd] #fix warnings on FreeBSD
This commit is contained in:
commit
8c1c94f67f
@ -5,8 +5,11 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#define ISNAN(x) (!!(_isnan(x)))
|
#define ISNAN(x) (!!(_isnan(x)))
|
||||||
|
#define ISINF(x) (isinf(x))
|
||||||
#else
|
#else
|
||||||
#define ISNAN(x) (isnan(x))
|
int __isnan(double);
|
||||||
|
#define ISNAN(x) (__isnan(x))
|
||||||
|
#define ISINF(x) (__isinf(x))
|
||||||
#endif
|
#endif
|
||||||
#include "avmd_buffer.h"
|
#include "avmd_buffer.h"
|
||||||
#include "avmd_desa2.h"
|
#include "avmd_desa2.h"
|
||||||
|
@ -5,8 +5,11 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#define ISNAN(x) (!!(_isnan(x)))
|
#define ISNAN(x) (!!(_isnan(x)))
|
||||||
|
#define ISINF(x) (isinf(x))
|
||||||
#else
|
#else
|
||||||
#define ISNAN(x) (isnan(x))
|
int __isnan(double);
|
||||||
|
#define ISNAN(x) (__isnan(x))
|
||||||
|
#define ISINF(x) (__isinf(x))
|
||||||
#endif
|
#endif
|
||||||
#include "avmd_buffer.h"
|
#include "avmd_buffer.h"
|
||||||
#include "avmd_desa2_tweaked.h"
|
#include "avmd_desa2_tweaked.h"
|
||||||
@ -48,7 +51,7 @@ avmd_desa2_tweaked(circ_buffer_t *b, size_t i)
|
|||||||
we do simplified, modified for speed version : */
|
we do simplified, modified for speed version : */
|
||||||
|
|
||||||
result = n/d;
|
result = n/d;
|
||||||
if (isinf(result)) {
|
if (ISINF(result)) {
|
||||||
if (n < 0.0)
|
if (n < 0.0)
|
||||||
return -10.0;
|
return -10.0;
|
||||||
else
|
else
|
||||||
|
@ -38,8 +38,11 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#define ISNAN(x) (!!(_isnan(x)))
|
#define ISNAN(x) (!!(_isnan(x)))
|
||||||
|
#define ISINF(x) (isinf(x))
|
||||||
#else
|
#else
|
||||||
#define ISNAN(x) (isnan(x))
|
int __isnan(double);
|
||||||
|
#define ISNAN(x) (__isnan(x))
|
||||||
|
#define ISINF(x) (__isinf(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -1471,7 +1474,7 @@ static void avmd_process(avmd_session_t *s, switch_frame_t *frame)
|
|||||||
sample_to_skip_n = AVMD_SAMLPE_TO_SKIP_N;
|
sample_to_skip_n = AVMD_SAMLPE_TO_SKIP_N;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (isnan(omega)) {
|
if (ISNAN(omega)) {
|
||||||
#ifdef AVMD_DEBUG
|
#ifdef AVMD_DEBUG
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(s->session),
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(s->session),
|
||||||
SWITCH_LOG_DEBUG, "<<< AVMD, SKIP NaN >>>\n");
|
SWITCH_LOG_DEBUG, "<<< AVMD, SKIP NaN >>>\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user