提交 8691b484 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4128 --resolve regression from commit 73279f01 FS-3166

上级 ae23edad
......@@ -758,7 +758,7 @@ SWITCH_STANDARD_API(start_local_stream_function)
char *mycmd = NULL, *argv[8] = { 0 };
char *local_stream_name = NULL, *path = NULL, *timer_name = NULL;
uint32_t prebuf = 1;
int rate = 8000, interval = 20;
int rate = 8000, shuffle = 1, interval = 20;
uint8_t channels = 1;
int argc = 0;
char *cf = "local_stream.conf";
......@@ -790,7 +790,7 @@ SWITCH_STANDARD_API(start_local_stream_function)
}
}
//shuffle = argv[3] ? switch_true(argv[3]) : 1;
shuffle = argv[3] ? switch_true(argv[3]) : 1;
prebuf = argv[4] ? atoi(argv[4]) : DEFAULT_PREBUFFER_SIZE;
if (argv[5]) {
......@@ -833,8 +833,8 @@ SWITCH_STANDARD_API(start_local_stream_function)
if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
rate = tmp;
}
//} else if (!strcasecmp(var, "shuffle")) {
//shuffle = switch_true(val);
} else if (!strcasecmp(var, "shuffle")) {
shuffle = switch_true(val);
} else if (!strcasecmp(var, "prebuf")) {
tmp = atoi(val);
if (tmp > 0) {
......@@ -899,7 +899,7 @@ SWITCH_STANDARD_API(start_local_stream_function)
source->timer_name = switch_core_strdup(source->pool, timer_name ? timer_name : (argv[7] ? argv[7] : "soft"));
source->prebuf = prebuf;
source->stopped = 0;
source->shuffle = shuffle;
source->samples = switch_samples_per_packet(source->rate, source->interval);
switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论