Ignore:
Timestamp:
Jan 24, 2007 2:02:09 AM (17 years ago)
Author:
bennylp
Message:

Implement ticket #62: option to play tones continuously, and added --play-tone option in pjsua

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/tonegen.h

    r875 r904  
    9999 
    100100 
     101/** 
     102 * Tone generator options. 
     103 */ 
     104enum 
     105{ 
     106    /** 
     107     * Play the tones in loop, restarting playing the first tone after 
     108     * the last tone has been played. 
     109     */ 
     110    PJMEDIA_TONEGEN_LOOP    = 1 
     111}; 
     112 
    101113 
    102114/** 
     
    112124 * @param bits_per_sample   Number of bits per sample. This version of PJMEDIA 
    113125 *                          only supports 16bit per sample. 
    114  * @param options           Option flags, must be zero for now. 
     126 * @param options           Option flags. Application may specify  
     127 *                          PJMEDIA_TONEGEN_LOOP to play the tone in a loop. 
    115128 * @param p_port            Pointer to receive the port instance. 
    116129 * 
     
    128141 
    129142/** 
     143 * Create an instance of tone generator with the specified parameters. 
     144 * When the tone generator is first created, it will be loaded with the 
     145 * default digit map. 
     146 * 
     147 * @param pool              Pool to allocate memory for the port structure. 
     148 * @param name              Optional name for the tone generator. 
     149 * @param clock_rate        Sampling rate. 
     150 * @param channel_count     Number of channels. Currently only mono and stereo 
     151 *                          are supported. 
     152 * @param samples_per_frame Number of samples per frame. 
     153 * @param bits_per_sample   Number of bits per sample. This version of PJMEDIA 
     154 *                          only supports 16bit per sample. 
     155 * @param options           Option flags. Application may specify  
     156 *                          PJMEDIA_TONEGEN_LOOP to play the tone in a loop. 
     157 * @param p_port            Pointer to receive the port instance. 
     158 * 
     159 * @return                  PJ_SUCCESS on success, or the appropriate 
     160 *                          error code. 
     161 */ 
     162PJ_DECL(pj_status_t) pjmedia_tonegen_create2(pj_pool_t *pool, 
     163                                             const pj_str_t *name, 
     164                                             unsigned clock_rate, 
     165                                             unsigned channel_count, 
     166                                             unsigned samples_per_frame, 
     167                                             unsigned bits_per_sample, 
     168                                             unsigned options, 
     169                                             pjmedia_port **p_port); 
     170 
     171 
     172/** 
    130173 * Check if the tone generator is still busy producing some tones. 
    131174 * 
     
    157200 * @param count             The number of tones in the array. 
    158201 * @param tones             Array of tones to be played. 
    159  * @param options           Playback options, must be zero for now. 
     202 * @param options           Option flags. Application may specify  
     203 *                          PJMEDIA_TONEGEN_LOOP to play the tone in a loop. 
    160204 * 
    161205 * @return                  PJ_SUCCESS on success, or PJ_ETOOMANY if 
     
    179223 * @param count             Number of digits in the array. 
    180224 * @param digits            Array of MF digits. 
    181  * @param options           Playback options, must be zero for now. 
     225 * @param options           Option flags. Application may specify  
     226 *                          PJMEDIA_TONEGEN_LOOP to play the tone in a loop. 
    182227 * 
    183228 * @return                  PJ_SUCCESS on success, or PJ_ETOOMANY if 
Note: See TracChangeset for help on using the changeset viewer.