Group PJMEDIA_AUDIODEV_SUBSYSTEM_API

group PJMEDIA_AUDIODEV_SUBSYSTEM_API

API Reference.

Functions

pj_status_t pjmedia_aud_subsys_init(pj_pool_factory *pf)

Initialize the audio subsystem. This will register all supported audio device factories to the audio subsystem. This function may be called more than once, but each call to this function must have the corresponding pjmedia_aud_subsys_shutdown() call.

Parameters:

pf – The pool factory.

Returns:

PJ_SUCCESS on successful operation or the appropriate error code.

pj_pool_factory *pjmedia_aud_subsys_get_pool_factory(void)

Get the pool factory registered to the audio subsystem.

Returns:

The pool factory.

pj_status_t pjmedia_aud_subsys_shutdown(void)

Shutdown the audio subsystem. This will destroy all audio device factories registered in the audio subsystem. Note that currently opened audio streams may or may not be closed, depending on the implementation of the audio device factories.

Returns:

PJ_SUCCESS on successful operation or the appropriate error code.

pj_status_t pjmedia_aud_register_factory(pjmedia_aud_dev_factory_create_func_ptr adf)

Register a supported audio device factory to the audio subsystem. This function can only be called after calling pjmedia_aud_subsys_init().

Parameters:

adf – The audio device factory.

Returns:

PJ_SUCCESS on successful operation or the appropriate error code.

pj_status_t pjmedia_aud_unregister_factory(pjmedia_aud_dev_factory_create_func_ptr adf)

Unregister an audio device factory from the audio subsystem. This function can only be called after calling pjmedia_aud_subsys_init(). Devices from this factory will be unlisted. If a device from this factory is currently in use, then the behavior is undefined.

Parameters:

adf – The audio device factory.

Returns:

PJ_SUCCESS on successful operation or the appropriate error code.