mod_portaudio: use the read timer for endpoints

This commit is contained in:
Moises Silva 2011-03-20 02:04:19 -04:00
parent 43551c6503
commit e7a58ab233
1 changed files with 2 additions and 0 deletions

View File

@ -824,6 +824,7 @@ static switch_status_t channel_endpoint_read(audio_endpoint_t *endpoint, switch_
int samples = 0;
if (!endpoint->in_stream) {
switch_core_timer_next(&endpoint->read_timer);
*frame = &globals.cng_frame;
return SWITCH_STATUS_SUCCESS;
}
@ -833,6 +834,7 @@ static switch_status_t channel_endpoint_read(audio_endpoint_t *endpoint, switch_
endpoint->inchan, &endpoint->read_timer);
if (!samples) {
switch_core_timer_next(&endpoint->read_timer);
*frame = &globals.cng_frame;
return SWITCH_STATUS_SUCCESS;
}