diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 6c1274e4a1..9bc955ba15 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -296,8 +296,11 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs; #define SWITCH_MAX_STACKS 32 #define SWITCH_THREAD_STACKSIZE 240 * 1024 -#define SWITCH_MAX_INTERVAL 120 -#define SWITCH_RECOMMENDED_BUFFER_SIZE 64 * (SWITCH_MAX_INTERVAL + 10) +#define SWITCH_MAX_INTERVAL 120 /* we only do up to 120ms */ +#define SWITCH_INTERVAL_PAD 10 /* A little extra buffer space to be safe */ +#define SWITCH_MAX_SAMPLE_LEN 32 +#define SWITCH_BYTES_PER_SAMPLE 2 /* slin is 2 bytes per sample */ +#define SWITCH_RECOMMENDED_BUFFER_SIZE (SWITCH_BYTES_PER_SAMPLE * SWITCH_MAX_SAMPLE_LEN * (SWITCH_MAX_INTERVAL + SWITCH_INTERVAL_PAD)) #define SWITCH_MAX_CODECS 30 #define SWITCH_MAX_STATE_HANDLERS 30 #define SWITCH_CORE_QUEUE_LEN 100000