Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1299 closed enhancement (fixed)

New callback to notify that sound device needs to be opened or closed — at Version 2

Reported by: bennylp Owned by: bennylp
Priority: minor Milestone: release-2.0-alpha
Component: pjsua-lib Version: 2.0-dev-branch
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

Implement 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.

Prototype of the callback:

    /**
     * Callback when the sound device is about to be opened or closed.
     * This callback will be called even when null sound device or no
     * sound device is configured by the application (i.e. the
     * #pjsua_set_null_snd_dev() and #pjsua_set_no_snd_dev() APIs).
     * This API is mostly useful when the application wants to manage
     * the sound device by itself (i.e. with #pjsua_set_no_snd_dev()),
     * to get notified when it should open or close the sound device.
     *
     * @param operation	The value will be set to 0 to signal that sound
     * 			device is about to be closed, and 1 to be opened.
     *
     * @return		The callback must return PJ_SUCCESS at the moment.
     */
    pj_status_t (*on_snd_dev_operation)(int operation);

Change History (2)

comment:1 Changed 13 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

(In [3632]) Fixed #1299: New callback to notify that sound device needs to be opened or closed

comment:2 Changed 13 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.