Ignore:
Timestamp:
Feb 5, 2009 10:59:14 AM (15 years ago)
Author:
nanang
Message:
  • Added new API for sound & sound port to create/open sound device with extended setting, to allow opening sound device with non-PCM format and other settings.
  • Updated symbian_ua/ua.cpp to be able to reopen sound device when audio stream session is using non-PCM data/passthrough codec.
  • Updated stream.c to allow it works with non-PCM data.
  • Added PCMU/A frames processing into non-PCM play/record callbacks in symbian_audio_aps.cpp.
  • Added passthrough codec init/deinitialization in pjsua-lib.
  • Added a new pjmedia_frame_ext helper function, pjmedia_frame_ext_pop_subframes, to pop-out/remove some subframes.
  • Other minor updates/fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia/sound_port.h

    r2394 r2438  
    160160                                                    unsigned options, 
    161161                                                    pjmedia_snd_port **p_port); 
    162                                                
     162 
     163 
     164/** 
     165 * Create unidirectional or bidirectional sound port. This also allows 
     166 * creating sound port with extended settings, e.g: audio format, see  
     167 * #pjmedia_snd_setting. 
     168 * 
     169 * @param pool              Pool to allocate sound port structure. 
     170 * @param dir               Sound device direction. 
     171 * @param rec_id            Device index for recorder/capture stream, or 
     172 *                          -1 to use the first capable device. 
     173 * @param play_id           Device index for playback stream, or -1 to use  
     174 *                          the first capable device. 
     175 * @param clock_rate        Sound device's clock rate to set. 
     176 * @param channel_count     Set number of channels, 1 for mono, or 2 for 
     177 *                          stereo. The channel count determines the format 
     178 *                          of the frame. 
     179 * @param samples_per_frame Number of samples per frame. 
     180 * @param bits_per_sample   Set the number of bits per sample. The normal  
     181 *                          value for this parameter is 16 bits per sample. 
     182 * @param setting           Sound device extended settings, see  
     183 *                          #pjmedia_snd_setting. 
     184 * @param p_port            Pointer to receive the sound device port instance. 
     185 * 
     186 * @return                  PJ_SUCCESS on success, or the appropriate error 
     187 *                          code. 
     188 */ 
     189PJ_DECL(pj_status_t) pjmedia_snd_port_create2(pj_pool_t *pool, 
     190                                              pjmedia_dir dir, 
     191                                              int rec_id, 
     192                                              int play_id, 
     193                                              unsigned clock_rate, 
     194                                              unsigned channel_count, 
     195                                              unsigned samples_per_frame, 
     196                                              unsigned bits_per_sample, 
     197                                              const pjmedia_snd_setting *setting, 
     198                                              pjmedia_snd_port **p_port); 
     199 
    163200 
    164201/** 
Note: See TracChangeset for help on using the changeset viewer.