snd_pcm_find()

Find all PCM devices in the system that meet the given criteria

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_find( unsigned int format, 
                  int *number, 
                  int *cards, 
                  int *devices, 
                  int mode );

Arguments:

format
Any combination of the SND_PCM_FMT_* constants. Here are the most commonly used flags:
number
The size of the card and device arrays that cards and devices point to. On return, number contains the total number of devices found.
cards
An array in which snd_pcm_find() stores the numbers of the cards it finds.
devices
An array in which snd_pcm_find() stores the numbers of the devices it finds.
mode
One of the following:

Library:

libasound.so

Description:

The snd_pcm_find() function finds all PCM devices in the system that support any combination of the given format parameters in the given mode.

The card and device arrays are to be considered paired: the following uniquely defines the first PCM device:

card[0] + device[0] 

Returns:

A positive integer representing the total number of devices found (same as number on return), or a negative value on error.

Errors:

-EINVAL
Invalid mode or format.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes