FS-5160 --resolve This is depricated in favor of {loops=10}tone_stream://path=/foo/bar.ttml adding legacy code to let both ways work

This commit is contained in:
Anthony Minessale
2013-03-09 07:58:09 -06:00
parent 1d289b3617
commit e942571876
2 changed files with 11 additions and 2 deletions
@@ -136,6 +136,15 @@ 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 = (char *)switch_stristr(";loops=", tonespec))) {
*tmp = '\0';
tmp += 7;
if (tmp) {
loops = atoi(tmp);
switch_buffer_set_loops(audio_buffer, loops);
}
}
if (handle->params) {
if ((tmp = switch_event_get_header(handle->params, "loops"))) {
loops = atoi(tmp);