Merge pull request #908 in FS/freeswitch from ~PIOTRGREGOR/freeswitch:bugfix/FS-9009-fix-windows-build to master

* commit '6d614ac1a7a0102391e18567843d5f764c32655b':
  FS-9009 [mod_avmd] #fix build on Windows
This commit is contained in:
Mike Jerris 2016-07-08 11:20:19 -05:00
commit f692aa6786
4 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,11 @@
#include "avmd_buffer.h" #include "avmd_buffer.h"
#ifdef WIN32
#define __attribute__(x)
#endif
double avmd_amplitude(circ_buffer_t *, size_t i, double f) __attribute__ ((nonnull(1))); double avmd_amplitude(circ_buffer_t *, size_t i, double f) __attribute__ ((nonnull(1)));

View File

@ -15,6 +15,12 @@
#include <math.h> #include <math.h>
#include "avmd_buffer.h" #include "avmd_buffer.h"
#ifdef WIN32
#define __attribute__(x)
#endif
/* Returns digital frequency estimation and amplitude estimation. */ /* Returns digital frequency estimation and amplitude estimation. */
extern double avmd_desa2(circ_buffer_t *b, size_t i, double *amplitude) __attribute__ ((nonnull(1,3))); extern double avmd_desa2(circ_buffer_t *b, size_t i, double *amplitude) __attribute__ ((nonnull(1,3)));

View File

@ -21,6 +21,11 @@
#include <switch.h> #include <switch.h>
#ifdef WIN32
#define __attribute__(x)
#endif
/* Instead of returning digital frequency estimation using /* Instead of returning digital frequency estimation using
* result = 0.5 * acos(n/d), * result = 0.5 * acos(n/d),
* which involves expensive computation of arc cosine on * which involves expensive computation of arc cosine on

View File

@ -35,6 +35,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#ifdef WIN32 #ifdef WIN32
#include <float.h> #include <float.h>
#define ISNAN(x) (!!(_isnan(x))) #define ISNAN(x) (!!(_isnan(x)))