Код: Выделить всё
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass.format.id == AST_FORMAT_SLINEAR)) {
if (user->talk.actual) {
ast_frame_adjust_volume(f, user->talk.actual);
}
if (ast_test_flag64(confflags, (CONFFLAG_OPTIMIZETALKER | CONFFLAG_MONITORTALKER))) {
if (user->talking == -1) {
user->talking = 0;
}
res = ast_dsp_silence(dsp, f, &totalsilence);
if (!user->talking && totalsilence < MEETME_DELAYDETECTTALK) {
set_user_talking(chan, conf, user, 1, ast_test_flag64(confflags, CONFFLAG_MONITORTALKER));
}
if (user->talking && totalsilence > MEETME_DELAYDETECTENDTALK) {
set_user_talking(chan, conf, user, 0, ast_test_flag64(confflags, CONFFLAG_MONITORTALKER));
}
}
if (using_pseudo) {
/* Absolutely do _not_ use careful_write here...
it is important that we read data from the channel
as fast as it arrives, and feed it into the conference.
The buffering in the pseudo channel will take care of any
timing differences, unless they are so drastic as to lose
audio frames (in which case carefully writing would only
have delayed the audio even further).
*/
/* As it turns out, we do want to use careful write. We just
don't want to block, but we do want to at least *try*
to write out all the samples.
*/
if (user->talking || !ast_test_flag64(confflags, CONFFLAG_OPTIMIZETALKER)) {
careful_write(fd, f->data.ptr, f->datalen, 0);
}
}
}
интересно,чем они примечательныdrug591 писал(а):Кодеки самописные
Как я понимаю выбор кодека осуществляется в channel.c в функции set_format и там же происходит определение нужно ли перекодировать из одного формата в другой?gland писал(а):meetme ничего не перекодирует - перекодирует *