--- apps/app_mixmonitor.c (Asterisk 13.6.0) +++ apps/app_mixmonitor.c (working copy) @@ -525 +525 @@ -#define SAMPLES_PER_FRAME 160 +#define SAMPLES_PER_FRAME 80 --- apps/app_jack.c (Asterisk 13.6.0) +++ apps/app_jack.c (working copy) @@ -409,2 +409,2 @@ - /* Guessing frame->datalen assuming a ptime of 20ms */ - jack_data->frame_datalen = jack_data->audiohook_rate / 50; + /* Guessing frame->datalen assuming a ptime of 10ms */ + jack_data->frame_datalen = jack_data->audiohook_rate * 10 / 1000; --- apps/app_meetme.c (Asterisk 13.6.0) +++ apps/app_meetme.c (working copy) @@ -686 +686 @@ -#define CONF_SIZE 320 +#define CONF_SIZE 160 --- channels/chan_console.c (Asterisk 13.6.0) +++ channels/chan_console.c (working copy) @@ -93 +93 @@ - * 320 samples (20 ms) is the most common frame size in Asterisk. So, the code + * 160 samples (10 ms) is the most common frame size in Asterisk. So, the code @@ -100 +100 @@ -#define NUM_SAMPLES 320 +#define NUM_SAMPLES 160 --- channels/chan_oss.c (Asterisk 13.6.0) +++ channels/chan_oss.c (working copy) @@ -190 +190 @@ - * 160 is used almost universally, so you should not change it. + * 80 is used almost universally, so you should not change it. @@ -216 +216 @@ -#define FRAME_SIZE 160 +#define FRAME_SIZE 80 --- main/channel.c (Asterisk 13.6.0) +++ main/channel.c (working copy) @@ -2934 +2934,2 @@ - res = generate(chan, tmp, 0, ast_format_get_sample_rate(ast_channel_writeformat(chan)) / 50); + /* 1 second = 1000ms; Asterisk internal generator is 10ms; result are the samples per 10ms */ + res = generate(chan, tmp, 0, ast_format_get_sample_rate(ast_channel_writeformat(chan)) * 10 / 1000); @@ -2968 +2969 @@ - ast_settimeout(chan, 50, generator_force, chan); + ast_settimeout(chan, (1000 / 10), generator_force, chan);