At least the dereverb now has a chance of working...
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sat, 10 Apr 2004 07:56:08 +0000 (07:56 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sat, 10 Apr 2004 07:56:08 +0000 (07:56 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@6501 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/preprocess.c
libspeex/testdenoise.c

index ad6adb3..e0c7d19 100644 (file)
@@ -1016,17 +1016,17 @@ int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
       break;
 
    case SPEEX_PREPROCESS_SET_DEREVERB_LEVEL:
-      st->reverb_level = (*(int*)ptr);
+      st->reverb_level = (*(float*)ptr);
       break;
    case SPEEX_PREPROCESS_GET_DEREVERB_LEVEL:
-      (*(int*)ptr) = st->reverb_level;
+      (*(float*)ptr) = st->reverb_level;
       break;
    
    case SPEEX_PREPROCESS_SET_DEREVERB_DECAY:
-      st->reverb_decay = (*(int*)ptr);
+      st->reverb_decay = (*(float*)ptr);
       break;
    case SPEEX_PREPROCESS_GET_DEREVERB_DECAY:
-      (*(int*)ptr) = st->reverb_decay;
+      (*(float*)ptr) = st->reverb_decay;
       break;
 
       default:
index f2327aa..0944976 100644 (file)
@@ -18,6 +18,12 @@ int main()
    speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
    f=8000;
    speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &f);
+   i=0;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
+   f=.4;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
+   f=.3;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
    while (1)
    {
       int vad;