From a7997d674a5db6104596dd228c424cd786f9c22c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 15 Feb 2008 18:06:38 +0000 Subject: [PATCH] some more defines. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7622 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_types.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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