snd_pcm_get_handled_device()

Indicates whether the user can affect the audio on a device

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_get_handled_device(snd_pcm_t *pcm, int *handled)

Since:

BlackBerry 10.3.0

Arguments:

pcm
The handle that is returned after a call to snd_pcm_open_* functions.
handled
An integer to specify whether the position of the microphone or speaker could be affected by the user. For example, the placement of the user's hand on the device could cover a speaker and therefore, impact the audio coming from that speaker.

You can specify SND_PCM_CHANNEL_PLAYBACK to indicate that it's possible for the user to affect the sound of the speaker. Alternatively, you can specify SND_PCM_CHANNEL_CAPTURE to indicate that the microphone could be affected by the user. A value of zero indicates the user can't affect the audio to the microphone or speaker.

Library:

libasound.so

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

Description:

The quality of the audio can be affected because users could potentially block the speaker or microphone with their hand while using the device.

Returns:

Zero if the function completed successfully, otherwise a non-zero value is returned. When the function completes successfully, the handled argument is populated with a result.

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 pcm (snd_pcm_t) is used across multiple threads.