ref: a31899f0e2c19f9ffab23738800771657da501ca
parent: 300cb5b86ab6f47ac7240441e6a1e1c788323679
author: Jean-Marc Valin <[email protected]>
date: Mon Mar 3 17:28:23 EST 2008
added suffix to real fft. The celtclient can now be built with an unmodified speexdsp library.
--- a/libcelt/kiss_fftr.h
+++ b/libcelt/kiss_fftr.h
@@ -6,7 +6,13 @@
extern "C" {
#endif
-
+#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
+
+#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
+#define kiss_fftr_twiddles SUF(kiss_fftr_twiddles,KF_SUFFIX)
+#define kiss_fftr SUF(kiss_fftr,KF_SUFFIX)
+#define kiss_fftri SUF(kiss_fftri,KF_SUFFIX)
+
/*
Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
@@ -38,6 +44,7 @@
input timedata has nfft scalar points
output freqdata has nfft/2+1 complex points, packed into nfft scalar points
*/
+void kiss_fftr_twiddles(kiss_fftr_cfg st,kiss_fft_scalar *freqdata);
void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
--- a/tools/celtclient.c
+++ b/tools/celtclient.c
@@ -121,8 +121,9 @@
/* Setup the encoder and decoder in wideband */
CELTEncoder *enc_state;
CELTDecoder *dec_state;
- enc_state = celt_encoder_new(celt_mono);
- dec_state = celt_decoder_new(celt_mono);
+ CELTMode *mode = celt_mode_create(48000, 2, 256, 128, NULL);
+ enc_state = celt_encoder_create(mode);
+ dec_state = celt_decoder_create(mode);
struct sched_param param;
/*param.sched_priority = 40; */
param.sched_priority = sched_get_priority_min(SCHED_FIFO);
@@ -142,7 +143,8 @@
/* Setup jitter buffer using decoder */
JitterBuffer *jitter;
jitter = jitter_buffer_init(FRAME_SIZE);
-
+ tmp = FRAME_SIZE;
+ jitter_buffer_ctl(jitter, JITTER_BUFFER_SET_MARGIN, &tmp);
/* Echo canceller with 200 ms tail length */
SpeexEchoState *echo_state = speex_echo_state_init(FRAME_SIZE, 10*FRAME_SIZE);
tmp = SAMPLING_RATE;