Commit 7b42ea93 authored by aymeric's avatar aymeric

fix msvc compilation with C compiler

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@325 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent abb34777
......@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "mediastreamer2/msfilter.h"
#include <math.h>
#if defined(_WIN32_WCE)
#define DISABLE_SPEEX
......@@ -35,14 +36,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CONF_GRAN_MAX 12 /* limit for 'too much data' */
#endif
//#ifndef CONF_GRAN
//#define CONF_GRAN (160*4)
//#endif
#define CONF_NSAMPLES 160*4*4 /* (CONF_GRAN/2) */
#ifndef CONF_MAX_PINS
#define CONF_MAX_PINS 32
#endif
static const float max_e=32767*32767;
static const float coef=0.1;
typedef struct Channel{
MSBufferizer buff;
int16_t input[CONF_NSAMPLES];
......@@ -62,6 +63,8 @@ typedef struct Channel{
SpeexPreprocessState *speex_pp;
#endif
float energy;
} Channel;
typedef struct ConfState{
......@@ -471,8 +474,8 @@ static void conf_dispatch(MSFilter *f, ConfState *s){
m=conf_output(s,chan);
else
{
m=allocb(s->conf_gran,0);
int k;
m=allocb(s->conf_gran,0);
for (k=0;k<s->conf_nsamples;++k){
*((int16_t*)m->b_wptr)=0;
m->b_wptr+=2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment