FS-3176 forget the last patch I forgot there is no way to know the right codec using it the file string way, you will just have to manually specify en.PCMA as before but now it should work

This commit is contained in:
Anthony Minessale
2011-03-31 15:01:58 -05:00
parent e52e44e39c
commit 913ec9861e
3 changed files with 76 additions and 60 deletions

View File

@@ -1995,23 +1995,14 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f
char buf[256] = "";
int ret;
va_list ap;
int native = !strcasecmp(sh->ext, "native");
va_start(ap, fmt);
if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
if (!sh->cnt++) {
if (native) {
sh->stream.write_function(&sh->stream, "file_string://%s", buf);
} else {
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
}
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
} else {
if (native) {
sh->stream.write_function(&sh->stream, "!%s", buf);
} else {
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
}
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
}
}