git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@163 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2005-12-16 18:50:29 +00:00
parent 9aab183178
commit fb3cb5f0a6
3 changed files with 5 additions and 5 deletions

View File

@ -76,11 +76,11 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
}
if (switch_core_session_read_frame(session_a, &read_frame, -1) == SWITCH_STATUS_SUCCESS && read_frame->datalen) {
if (switch_core_session_write_frame(session_b, read_frame, -1) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame.... %d Bubye!\n", read_frame->datalen);
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "write: Bad Frame.... %d Bubye!\n", read_frame->datalen);
data->running = -1;
}
} else {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame....Bubye!\n");
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read: Bad Frame.... %d Bubye!\n", read_frame->datalen);
data->running = -1;
}
}

View File

@ -602,7 +602,7 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_clear_flag(tech_pvt, TFLAG_VOICE);
if(!tech_pvt->read_frame.datalen) {
break;
continue;
}
*frame = &tech_pvt->read_frame;

View File

@ -416,12 +416,12 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
return SWITCH_STATUS_FALSE;
}
switch_mutex_lock(globals.device_lock);
//switch_mutex_lock(globals.device_lock);
if (tech_pvt->audio_out) {
WriteAudioStream(tech_pvt->audio_out, (short *)frame->data, (int)(frame->datalen / sizeof(SAMPLE)));
status = SWITCH_STATUS_SUCCESS;
}
switch_mutex_unlock(globals.device_lock);
//switch_mutex_unlock(globals.device_lock);
return status;