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

This commit is contained in:
Anthony Minessale 2012-04-18 14:55:59 -05:00
parent ae23edad9c
commit 8691b484c2
1 changed files with 5 additions and 5 deletions

View File

@ -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);