]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
added .vox (Dialogic/OKI ADPCM 8kHz format) to mod_sndfile
authorChris Rienzo <chris.rienzo@grasshopper.com>
Tue, 23 Apr 2013 20:21:02 +0000 (16:21 -0400)
committerChris Rienzo <chris.rienzo@grasshopper.com>
Tue, 23 Apr 2013 20:27:34 +0000 (16:27 -0400)
src/mod/formats/mod_sndfile/mod_sndfile.c

index 05e306d7a29adc42d76e18d5de94110b09bf5572..c2966432634ca9e2eec326bcc694ece52db84409 100644 (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;