]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
chereburm is never satisfied
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 11 Dec 2007 22:44:28 +0000 (22:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 11 Dec 2007 22:44:28 +0000 (22:44 +0000)
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

index efd17c6faa07ba4d64872767360ff2a70685f85d..709323f674a045d9d069fcbf7140aa57bc5bd020 100644 (file)
@@ -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) {