mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
FS-3910 test this patch
This commit is contained in:
@@ -486,13 +486,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
||||
}
|
||||
|
||||
if (bp->ready && switch_test_flag(bp, SMBF_READ_STREAM)) {
|
||||
audio_buffer_header_t h = { 0 };
|
||||
|
||||
switch_mutex_lock(bp->read_mutex);
|
||||
h.ts = bp->timer.samplecount;
|
||||
h.len = read_frame->datalen;
|
||||
switch_buffer_write(bp->raw_read_buffer, &h, sizeof(h));
|
||||
switch_buffer_write(bp->raw_read_buffer, read_frame->data, h.len);
|
||||
switch_buffer_write(bp->raw_read_buffer, read_frame->data, read_frame->datalen);
|
||||
|
||||
if (bp->callback) {
|
||||
ok = bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ);
|
||||
@@ -654,10 +649,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bp->ready && bp->timer.timer_interface) {
|
||||
switch_core_timer_sync(&bp->timer);
|
||||
}
|
||||
|
||||
if (bp->ready && switch_test_flag(bp, SMBF_READ_PING)) {
|
||||
switch_mutex_lock(bp->read_mutex);
|
||||
bp->ping_frame = *frame;
|
||||
@@ -982,14 +973,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
||||
}
|
||||
|
||||
if (switch_test_flag(bp, SMBF_WRITE_STREAM)) {
|
||||
audio_buffer_header_t h = { 0 };
|
||||
|
||||
switch_mutex_lock(bp->write_mutex);
|
||||
h.ts = bp->timer.samplecount;
|
||||
h.len = write_frame->datalen;
|
||||
|
||||
switch_buffer_write(bp->raw_write_buffer, &h, sizeof(h));
|
||||
switch_buffer_write(bp->raw_write_buffer, write_frame->data, h.len);
|
||||
switch_buffer_write(bp->raw_write_buffer, write_frame->data, write_frame->datalen);
|
||||
switch_mutex_unlock(bp->write_mutex);
|
||||
|
||||
if (bp->callback) {
|
||||
|
Reference in New Issue
Block a user