From 33395d6727b408a568d01538bbc174be59980311 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 11 Dec 2007 22:44:28 +0000 Subject: [PATCH] chereburm is never satisfied git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6679 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/formats/mod_local_stream/mod_local_stream.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mod/formats/mod_local_stream/mod_local_stream.c b/src/mod/formats/mod_local_stream/mod_local_stream.c index efd17c6faa..709323f674 100644 --- a/src/mod/formats/mod_local_stream/mod_local_stream.c +++ b/src/mod/formats/mod_local_stream/mod_local_stream.c @@ -63,6 +63,7 @@ struct local_stream_source { int rate; int interval; int samples; + uint32_t prebuf; char *timer_name; local_stream_context_t *context_list; switch_dir_t *dir_handle; @@ -122,6 +123,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void } fname = path_buf; + fh.prebuf = source->prebuf; + if (switch_core_file_open(&fh, (char *)fname, source->channels, @@ -330,6 +333,11 @@ static void launch_threads(void) if (tmp == 8000 || tmp == 16000) { source->rate = tmp; } + } else if (!strcasecmp(var, "prebuf")) { + int tmp = atoi(val); + if (tmp > 0) { + source->prebuf = (uint32_t) tmp; + } } else if (!strcasecmp(var, "channels")) { int tmp = atoi(val); if (tmp == 1 || tmp == 2) {