added .vox (Dialogic/OKI ADPCM 8kHz format) to mod_sndfile

This commit is contained in:
Chris Rienzo 2013-04-23 16:21:02 -04:00
parent 3438337a16
commit 5f83c708ef
1 changed files with 5 additions and 1 deletions

View File

@ -143,6 +143,10 @@ static switch_status_t sndfile_file_open(switch_file_handle_t *handle, const cha
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_ALAW;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "vox")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_VOX_ADPCM;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "adpcm")) {
context->sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM;
context->sfinfo.channels = 1;
@ -350,7 +354,7 @@ static switch_status_t setup_formats(void)
char buffer[128];
int format, major_count, subtype_count, m, s;
int len, x, skip;
char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "ulaw", "al", "alaw", "adpcm", NULL };
char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "ulaw", "al", "alaw", "adpcm", "vox", NULL };
int exlen = (sizeof(extras) / sizeof(extras[0]));
buffer[0] = 0;