Ignore:
Timestamp:
Jun 14, 2008 8:33:44 PM (11 years ago)
Author:
bennylp
Message:

Added pjmedia_tonegen_rewind()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/tonegen.c

    r1859 r2022  
    402402 
    403403/* 
     404 * Instruct the tone generator to stop current processing. 
     405 */ 
     406PJ_DEF(pj_status_t) pjmedia_tonegen_rewind(pjmedia_port *port) 
     407{ 
     408    struct tonegen *tonegen = (struct tonegen*) port; 
     409    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVAL); 
     410 
     411    TRACE_((THIS_FILE, "tonegen_rewind()")); 
     412 
     413    /* Reset back to the first tone */ 
     414    pj_lock_acquire(tonegen->lock); 
     415    tonegen->cur_digit = 0; 
     416    tonegen->dig_samples = 0; 
     417    pj_lock_release(tonegen->lock); 
     418 
     419    return PJ_SUCCESS; 
     420} 
     421 
     422 
     423/* 
    404424 * Callback to destroy tonegen 
    405425 */ 
Note: See TracChangeset for help on using the changeset viewer.