Changeset 1041:985498c76f96 in mediastreamer2
- Timestamp:
- Jun 30, 2010 10:12:48 AM (3 years ago)
- Branch:
- default
- Parents:
- 1034:c82afd5c2522 (diff), 1040:8e8716785083 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 edited
-
src/speexec.c (modified) (1 diff)
-
src/speexec.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/speexec.c
r1034 r1041 138 138 maxsize=ms_bufferizer_get_avail(&s->echo); 139 139 if (s->echostarted==FALSE && maxsize>0){ 140 ms_message("speex_ec: starting receiving echo signal"); 140 141 s->echostarted=TRUE; 141 142 } -
src/speexec.c
r1040 r1041 31 31 #endif 32 32 33 //#define EC_DUMP 1 34 35 #define EC_DUMP_PREFIX "/sdcard" 36 33 37 static const int framesize=128; 34 static const int ref_max_delay=70; 35 36 #if 0 37 typedef struct _BufferSizeEstimator{ 38 float mean; 39 float jitter; 40 }BufferSizeEstimator; 41 42 void buffer_size_estimator_update(BufferSizeEstimator *bse, int size){ 43 static const float smooth=0.04; 44 } 45 46 #endif 38 static const int ref_max_delay=60; 39 47 40 48 41 typedef struct SpeexECState{ … … 58 51 int delay_ms; 59 52 int tail_length_ms; 53 #ifdef EC_DUMP 54 FILE *echofile; 55 FILE *reffile; 56 #endif 60 57 bool_t using_silence; 61 58 bool_t echostarted; … … 77 74 s->echostarted=FALSE; 78 75 76 #ifdef EC_DUMP 77 { 78 char *fname=ms_strdup_printf("%s/msspeexec-%p-echo.raw", EC_DUMP_PREFIX,f); 79 s->echofile=fopen(fname,"w"); 80 ms_free(fname); 81 fname=ms_strdup_printf("%s/msspeexec-%p-ref.raw", EC_DUMP_PREFIX,f); 82 s->reffile=fopen(fname,"w"); 83 ms_free(fname); 84 } 85 #endif 86 79 87 f->data=s; 80 88 } … … 84 92 ms_bufferizer_uninit(&s->ref); 85 93 ms_bufferizer_uninit(&s->delayed_ref); 94 #ifdef EC_DUMP 95 if (s->echofile) 96 fclose(s->echofile); 97 if (s->reffile) 98 fclose(s->reffile); 99 #endif 86 100 ms_free(s); 87 101 } … … 167 181 oref->b_wptr+=nbytes; 168 182 ms_queue_put(f->outputs[0],oref); 183 #ifdef EC_DUMP 184 if (s->reffile) 185 fwrite(ref,nbytes,1,s->reffile); 186 if (s->echofile) 187 fwrite(echo,nbytes,1,s->echofile); 188 #endif 169 189 speex_echo_cancellation(s->ecstate,(short*)echo,(short*)ref,(short*)oecho->b_wptr); 170 190 speex_preprocess_run(s->den, (short*)oecho->b_wptr);
Note: See TracChangeset
for help on using the changeset viewer.
