Changes between Version 7 and Version 8 of Audio_Dev_API


Ignore:
Timestamp:
Feb 20, 2009 4:31:36 PM (10 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Audio_Dev_API

    v7 v8  
    212212   .. 
    213213    }}} 
    214  6. .. and so on 
    215  
    216  
    217  
     214 6. '''Latency''' setting. Old code: 
     215    {{{ 
     216pjmedia_snd_set_latency(rec_latency, play_latency); 
     217    }}} 
     218    New code: 
     219    {{{ 
     220// Latency setting is now part of stream creation parameter 
     221pjmedia_aud_dev_param param; 
     222 
     223... 
     224param.flags |= (PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY |  
     225                PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY); 
     226param.input_latency_ms = ..; 
     227param.output_latency_ms = ..; 
     228 
     229status = pjmedia_aud_stream_create(&param, .. ); 
     230    }}} 
     231 7. Device routing. Old code (supported on APS only): 
     232    {{{ 
     233pjmedia_snd_aps_activate_loudspeaker(stream, PJ_TRUE); 
     234    }}} 
     235    New code: 
     236    {{{ 
     237int value = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 
     238 
     239status = pjmedia_aud_stream_set_cap(stream,  
     240                                    PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE,  
     241                                    &value); 
     242    }}} 
     243 
     244 
     245