mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-15 05:08:26 +00:00
MODFORM-22
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11659 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6a405a2323
commit
83700a0681
@ -139,6 +139,9 @@ 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.format = SF_FORMAT_RAW | SF_FORMAT_ALAW;
|
||||||
context->sfinfo.channels = 1;
|
context->sfinfo.channels = 1;
|
||||||
context->sfinfo.samplerate = 8000;
|
context->sfinfo.samplerate = 8000;
|
||||||
|
} else if (!strcmp(ext, "adpcm")) {
|
||||||
|
context->sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM;
|
||||||
|
context->sfinfo.samplerate = 8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mode & SFM_WRITE) && sf_format_check(&context->sfinfo) == 0) {
|
if ((mode & SFM_WRITE) && sf_format_check(&context->sfinfo) == 0) {
|
||||||
@ -305,7 +308,7 @@ static switch_status_t setup_formats(void)
|
|||||||
char buffer[128];
|
char buffer[128];
|
||||||
int format, major_count, subtype_count, m, s;
|
int format, major_count, subtype_count, m, s;
|
||||||
int len, x, skip;
|
int len, x, skip;
|
||||||
char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "al", NULL };
|
char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "al", "adpcm", NULL };
|
||||||
int exlen = (sizeof(extras) / sizeof(extras[0]));
|
int exlen = (sizeof(extras) / sizeof(extras[0]));
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user