~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/speex/libspeex/testdenoise.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifdef HAVE_CONFIG_H
2
 
#include "config.h"
3
 
#endif
4
 
 
5
 
#include <speex/speex_preprocess.h>
6
 
#include <stdio.h>
7
 
 
8
 
#define NN 160
9
 
 
10
 
int main()
11
 
{
12
 
   short in[NN];
13
 
   int i;
14
 
   SpeexPreprocessState *st;
15
 
   int count=0;
16
 
   float f;
17
 
 
18
 
   st = speex_preprocess_state_init(NN, 8000);
19
 
   i=1;
20
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
21
 
   i=0;
22
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
23
 
   i=8000;
24
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
25
 
   i=0;
26
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
27
 
   f=.0;
28
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
29
 
   f=.0;
30
 
   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
31
 
   while (1)
32
 
   {
33
 
      int vad;
34
 
      fread(in, sizeof(short), NN, stdin);
35
 
      if (feof(stdin))
36
 
         break;
37
 
      vad = speex_preprocess_run(st, in);
38
 
      /*fprintf (stderr, "%d\n", vad);*/
39
 
      fwrite(in, sizeof(short), NN, stdout);
40
 
      count++;
41
 
   }
42
 
   speex_preprocess_state_destroy(st);
43
 
   return 0;
44
 
}