]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_portaudio: use the read timer for endpoints
authorMoises Silva <moises.silva@gmail.com>
Sun, 20 Mar 2011 06:04:19 +0000 (02:04 -0400)
committerMoises Silva <moises.silva@gmail.com>
Sun, 20 Mar 2011 06:04:19 +0000 (02:04 -0400)
src/mod/endpoints/mod_portaudio/mod_portaudio.c

index 74ba9a76fbbf65cef658ed993a919b1d6133e2ef..e27d24b1900560a3255bfb8d605365bcd89735fe 100644 (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;
        }