From 5f83c708efca0549fcefeeb4067568755c0fb4a1 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Tue, 23 Apr 2013 16:21:02 -0400 Subject: [PATCH] added .vox (Dialogic/OKI ADPCM 8kHz format) to mod_sndfile --- src/mod/formats/mod_sndfile/mod_sndfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/formats/mod_sndfile/mod_sndfile.c b/src/mod/formats/mod_sndfile/mod_sndfile.c index 05e306d7a2..c296643263 100644 --- a/src/mod/formats/mod_sndfile/mod_sndfile.c +++ b/src/mod/formats/mod_sndfile/mod_sndfile.c @@ -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;