fix resampler issue caused by refactoring impacting audio quality of resampled calls in the conference
This commit is contained in:
parent
93983e63cc
commit
025e65a0cd
|
@ -4512,9 +4512,9 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
|
|||
int16_t *bptr = (int16_t *) read_frame->data;
|
||||
int len = (int) read_frame->datalen;
|
||||
|
||||
switch_resample_process(read_resampler, bptr, len / 2 / member->conference->channels);
|
||||
memcpy(member->resample_out, read_resampler->to, read_resampler->to_len * 2 * member->conference->channels);
|
||||
len = read_resampler->to_len * 2 * member->conference->channels;
|
||||
switch_resample_process(read_resampler, bptr, len / 2 / member->read_impl.number_of_channels);
|
||||
memcpy(member->resample_out, read_resampler->to, read_resampler->to_len * 2 * member->read_impl.number_of_channels);
|
||||
len = read_resampler->to_len * 2 * member->read_impl.number_of_channels;
|
||||
datalen = len;
|
||||
data = member->resample_out;
|
||||
} else {
|
||||
|
@ -8942,7 +8942,7 @@ static int setup_media(conference_member_t *member, conference_obj_t *conference
|
|||
if (read_impl.actual_samples_per_second != conference->rate) {
|
||||
if (switch_resample_create(&member->read_resampler,
|
||||
read_impl.actual_samples_per_second,
|
||||
conference->rate, member->frame_size, SWITCH_RESAMPLE_QUALITY, conference->channels) != SWITCH_STATUS_SUCCESS) {
|
||||
conference->rate, member->frame_size, SWITCH_RESAMPLE_QUALITY, read_impl.number_of_channels) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_CRIT, "Unable to create resampler!\n");
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue