[Previous] [Contents] [Next]

snd_pcm_find()

Find all PCM devices in the system

Synopsis:

#include <sys/asoundlib.h>

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

Library:

libasound.so

Description:

The snd_pcm_find() function finds all PCM devices in the system that support the given format and mode parameters. The number parameter specifies the size of the card and device arrays that cards and devices point to. Upon return, number contains the total number of devices found. The card and device arrays are to be considered paired: the following uniquely defines the first PCM device:

card[0] + device[0] 

Returns:

Zero on success, or a negative value on error.

Errors:

-EINVAL
Invalid mode or format.

Examples:

See the obtaining Card and Device values example in the Playing audio data chapter.

Classification:

Neutrino

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

[Previous] [Contents] [Next]