mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-30 02:10:39 +00:00
chereburm is never satisfied
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6679 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
294b6c6b81
commit
33395d6727
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user