[Freeswitch-trunk] [commit] r12720 - freeswitch/trunk/src
FreeSWITCH SVN
anthm at freeswitch.org
Sun Mar 22 18:59:36 PDT 2009
Author: anthm
Date: Sun Mar 22 20:59:35 2009
New Revision: 12720
Log:
make gaussian noise less noisy FSCORE-340
Modified:
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_resample.c
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Sun Mar 22 20:59:35 2009
@@ -1871,7 +1871,7 @@
silence = ringback.silence;
}
} else {
- silence = 400;
+ silence = 600;
}
if ((ringback.fh || silence || ringback.audio_buffer) && write_frame.codec && write_frame.datalen) {
Modified: freeswitch/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/trunk/src/switch_resample.c (original)
+++ freeswitch/trunk/src/switch_resample.c Sun Mar 22 20:59:35 2009
@@ -181,24 +181,22 @@
}
}
-#if SILENCE_METHOD_ONE
+#if 1
SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples, uint32_t divisor)
{
int16_t x;
uint32_t i;
int sum_rnd = 0;
- int16_t rnd2 = (int16_t) switch_micro_time_now();
+ int16_t rnd2 = (int16_t) switch_micro_time_now() + (int16_t) (intptr_t) data;
assert(divisor);
-
-
for (i = 0; i < samples; i++, sum_rnd = 0) {
for (x = 0; x < 6; x++) {
rnd2 = rnd2 * 31821U + 13849U;
- sum_rnd += rnd2;
+ sum_rnd += rnd2 ;
}
- switch_normalize_to_16bit(sum_rnd);
+ //switch_normalize_to_16bit(sum_rnd);
*data = (int16_t) ((int16_t) sum_rnd / (int) divisor);
data++;
More information about the Freeswitch-trunk
mailing list