snd_pcm_plugin_find_stereo_pair()

Determines the best microphones or speakers to utilize for producing a mono signal

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_plugin_find_stereo_pair(snd_pcm_t   *pcm,
                                    int          angle,
                                    unsigned int pos[2]);

Since:

BlackBerry 10.3.0

Arguments:

pcm
The handle that is returned after a call to snd_pcm_open_* functions.
angle
The clockwise orientation of the device, in degrees. For example, specify 90 when the top of the device is physically to the right.
pos
An array that stores the location the speakers that produce the best mono signal on the device.

Library:

libasound.so

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

Description:

To determine the best microphones or speakers to use, an average of the input from the microphones is taken. The system tries to pick microphones that are near the center of the device or an equal distance from the center. If microphones are requested, microphones that are near speakers are avoided. As part of a separate selection process, speakers or microphones that are near a user's hand are avoided.

Returns:

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

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.