Create a connection and handle to the specified control device
#include <sys/asoundlib.h> int snd_ctl_open( snd_ctl_t **handle, int card );
- A pointer to a location in which snd_ctl_open() stores a handle for the card, which you need to pass to the other snd_ctl_* functions.
- The card number.
Use the -l asound option to qcc to link against this library.
The snd_ctl_open() function creates a new handle and opens a connection to the control interface for sound card number card (0-N). This handle may be used in all of the other snd_ctl_*() calls.
Zero on success, or a negative value if an error occurs.
- Search permission is denied on a component of the path prefix, or the device exists and the permissions specified are denied.
- The open() operation was interrupted by a signal.
- Too many file descriptors are currently in use by this process.
- Too many files are currently open in the system.
- The named device doesn't exist.
- No memory available for data structure.
- The audio driver version is incompatible with the client library that the application is using.