Reverted API change on the AGC because it would bite too many
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 19 Nov 2007 13:16:03 +0000 (13:16 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 19 Nov 2007 13:16:03 +0000 (13:16 +0000)
people.

git-svn-id: http://svn.xiph.org/trunk/speex@14186 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/preprocess.c

index d94a75a..c5641b1 100644 (file)
@@ -1065,17 +1065,18 @@ int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
    case SPEEX_PREPROCESS_GET_AGC:
       (*(spx_int32_t*)ptr) = st->agc_enabled;
       break;
-
+#ifndef DISABLE_FLOAT_API
    case SPEEX_PREPROCESS_SET_AGC_LEVEL:
-      st->agc_level = (*(spx_int32_t*)ptr);
+      st->agc_level = (*(float*)ptr);
       if (st->agc_level<1)
          st->agc_level=1;
       if (st->agc_level>32768)
          st->agc_level=32768;
       break;
    case SPEEX_PREPROCESS_GET_AGC_LEVEL:
-      (*(spx_int32_t*)ptr) = st->agc_level;
+      (*(float*)ptr) = st->agc_level;
       break;
+#endif /* #ifndef DISABLE_FLOAT_API */
    case SPEEX_PREPROCESS_SET_AGC_INCREMENT:
       st->max_increase_step = exp(0.11513f * (*(spx_int32_t*)ptr)*st->frame_size / st->sampling_rate);
       break;