snd_pcm_set_audioman_handle()

Bind an audioman handle to a PCM stream

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_set_audioman_handle( snd_pcm_t *handle,
                                 unsigned int audioman_handle );

Arguments:

handle
The handle for the PCM device, which you must have opened by calling snd_pcm_open_name(), snd_pcm_open(), or snd_pcm_open_preferred().
audioman_handle
The handle for the audio manager that you want to bind to the PCM stream.

Library:

libasound.so

Use the -l asound option to qcc to link against this library.

Description:

The snd_pcm_set_audioman_handle() function binds an audioman handle to a PCM stream. Binding an audioman handle to a PCM stream results in the PCM stream's conditionally ducking behind other streams, depending on the type of other stream playing. Rebinding a PCM stream to a new handle is permitted; doing so automatically unbinds the old handle. Binding the same audioman handle to two PCM streams isn't permitted.

Returns:

EOK on success, a negative errno upon failure. The errno values are available in the errno.h file.

Errors:

-EINVAL
The PCM handle is NULL, or the audioman handle couldn't be bound to the stream.
-EPERM
The thread doesn't have permission to bind the audioman handle to the stream

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Read the Caveats

Caveats:

This function is not thread safe if handle(snd_pcm_t) is used across multiple threads.