changing the params thing a bit, use {foo=bar} syntax instead

This commit is contained in:
Anthony Minessale
2013-02-20 16:34:13 -06:00
parent 3400a0a6da
commit 042347802b
5 changed files with 42 additions and 63 deletions
@@ -4498,6 +4498,7 @@ static switch_status_t next_file(switch_file_handle_t *handle)
handle->seekable = context->fh.seekable;
handle->speed = context->fh.speed;
handle->interval = context->fh.interval;
handle->max_samples = 0;
if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
switch_set_flag(handle, SWITCH_FILE_NATIVE);
@@ -136,10 +136,11 @@ static switch_status_t tone_stream_file_open(switch_file_handle_t *handle, const
switch_buffer_create_dynamic(&audio_buffer, 1024, 1024, 0);
switch_assert(audio_buffer);
if ((tmp = strstr(tonespec, ";loops="))) {
*tmp = '\0';
loops = atoi(tmp + 7);
switch_buffer_set_loops(audio_buffer, loops);
if (handle->params) {
if ((tmp = switch_event_get_header(handle->params, "loops"))) {
loops = atoi(tmp);
switch_buffer_set_loops(audio_buffer, loops);
}
}
if (!handle->samplerate) {