Changes between Version 120 and Version 121 of FAQ


Ignore:
Timestamp:
Aug 6, 2013 9:07:08 AM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v120 v121  
    601601}}} 
    602602 
    603 The next task is to update the sound device list in pjmedia. As we currently do not have an API to do this, what we can do is to shutdown and reinitialize the audio subsystem (pjmedia_aud_subsys_shutdown() and pjmedia_aud_subsys_init()) to make the backends update their device list. But you should only do this when the sound device is not being used. One way to do this is to call {{{pjsua_set_no_snd_dev()}}} to forcefully close the currently opened sound device (if any). Once the reinitialization is complete, you can tell PJSIP to manage the sound device again by calling {{{pjsua_set_snd_dev()}}}.  
     603Once a device change event is detected, call {{{pjmedia_aud_dev_refresh()}}} to cause PJMEDIA to refresh its sound device list. While the API says that it won't affect active audio device, it's better to do this when the sound device is not being opened. One way to do this is to call {{{pjsua_set_no_snd_dev()}}} to forcefully close the currently opened sound device (if any). Once the reinitialization is complete, you can tell PJSIP to manage the sound device again by calling {{{pjsua_set_snd_dev()}}}. Be careful that the sound device indexes may have changed now after the refresh. 
    604604 
    605605----