提交 b2f9fae6 authored 作者: Anthony Minessale's avatar Anthony Minessale

conference recording

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3139 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 1f29ce27
......@@ -73,6 +73,8 @@ static switch_status_t sndfile_file_open(switch_file_handle_t *handle, char *pat
}
if (mode & SFM_WRITE) {
sf_count_t frames = 0 ;
context->sfinfo.channels = handle->channels;
context->sfinfo.samplerate = handle->samplerate;
if (handle->samplerate == 8000 || handle->samplerate == 16000) {
......@@ -83,6 +85,8 @@ static switch_status_t sndfile_file_open(switch_file_handle_t *handle, char *pat
context->sfinfo.format |= SF_FORMAT_PCM_32;
}
sf_command (context->handle, SFC_FILE_TRUNCATE, &frames, sizeof (frames)) ;
/* Could add more else if() but i am too lazy atm.. */
if (!strcasecmp(ext, "wav")) {
context->sfinfo.format |= SF_FORMAT_WAV;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论