fix recording in stereo conferences
This commit is contained in:
parent
8f47f403fd
commit
011e069652
|
@ -4685,7 +4685,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
|
|||
//low_count = 0;
|
||||
|
||||
if ((rlen = (uint32_t) switch_buffer_read(member->mux_buffer, data_buf, data_buf_len))) {
|
||||
len = (switch_size_t) rlen / sizeof(int16_t);
|
||||
len = (switch_size_t) rlen / sizeof(int16_t) / conference->channels;
|
||||
no_data = 0;
|
||||
}
|
||||
switch_mutex_unlock(member->audio_out_mutex);
|
||||
|
@ -4723,7 +4723,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
|
|||
while(!no_data) {
|
||||
switch_mutex_lock(member->audio_out_mutex);
|
||||
if ((rlen = (uint32_t) switch_buffer_read(member->mux_buffer, data_buf, data_buf_len))) {
|
||||
len = (switch_size_t) rlen / sizeof(int16_t);
|
||||
len = (switch_size_t) rlen / sizeof(int16_t)/ conference->channels;
|
||||
switch_core_file_write(&fh, data_buf, &len);
|
||||
} else {
|
||||
no_data = 1;
|
||||
|
|
Loading…
Reference in New Issue