Changes between Initial Version and Version 2 of Ticket #1299


Ignore:
Timestamp:
Jul 13, 2011 3:09:17 AM (9 years ago)
Author:
bennylp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1299

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #1299 – Description

    initial v2  
    1 Useful if application wants to manage the sound device by itself, so that it knows when to open and close it. 
     1Implement a new callback to notify application that sound device is about to be opened or closed. This is useful if application wants to keep track whether the sound device is currently active or idle, and also will be very useful if application manages the sound device by itself since this callback notifies the application when the library needs to use the sound device and when it's safe to close it, taking into account the sound device idle timer. 
     2 
     3Prototype of the callback: 
     4{{{ 
     5    /** 
     6     * Callback when the sound device is about to be opened or closed. 
     7     * This callback will be called even when null sound device or no 
     8     * sound device is configured by the application (i.e. the 
     9     * #pjsua_set_null_snd_dev() and #pjsua_set_no_snd_dev() APIs). 
     10     * This API is mostly useful when the application wants to manage 
     11     * the sound device by itself (i.e. with #pjsua_set_no_snd_dev()), 
     12     * to get notified when it should open or close the sound device. 
     13     * 
     14     * @param operation The value will be set to 0 to signal that sound 
     15     *                  device is about to be closed, and 1 to be opened. 
     16     * 
     17     * @return          The callback must return PJ_SUCCESS at the moment. 
     18     */ 
     19    pj_status_t (*on_snd_dev_operation)(int operation); 
     20}}}