Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2007-11-19 16:16:03 +0300
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2007-11-19 16:16:03 +0300
commitc73c66de5cd4eb79fe8f50f3cb09edf7f072af81 (patch)
treed6512cf711078e1a8d96a948b7a69897843491ed
parent37657c2b0b228b26ebecf31e36c69327489e66f1 (diff)
Reverted API change on the AGC because it would bite too many
people. git-svn-id: http://svn.xiph.org/trunk/speex@14186 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--libspeex/preprocess.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libspeex/preprocess.c b/libspeex/preprocess.c
index d94a75a..c5641b1 100644
--- a/libspeex/preprocess.c
+++ b/libspeex/preprocess.c
@@ -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;