Changeset 2322:c1ae140b6ddc in roaraudio
- Timestamp:
- 08/06/09 01:29:40 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarphone.c
r2321 r2322 46 46 #define AE_SPEEX 2 47 47 #define AE_ROARD 3 48 49 #define DTX_F 25 48 50 49 51 struct { … … 53 55 int64_t dtx_threshold; 54 56 } g_conf; 57 58 int dtx_counter = 0; 55 59 56 60 struct roar_bixcoder transcoder[1]; … … 159 163 int64_t rms = roar_rms2_1_16(data, samples); 160 164 161 if ( rms < g_conf.dtx_threshold ) 162 memset(data, 0, samples*2); 165 if ( rms < g_conf.dtx_threshold ) { 166 if ( dtx_counter ) { 167 dtx_counter--; 168 } else { 169 memset(data, 0, samples*2); 170 } 171 } else { 172 dtx_counter = DTX_F; 173 } 163 174 164 175 return 0;
Note: See TracChangeset
for help on using the changeset viewer.