![]() |
![]() |
![]() |
Get control file descriptor
#include <sys/asoundlib.h> int snd_ctl_file_descriptor( snd_ctl_t * handle );
libasound.so
The snd_ctl_file_descriptor() function returns the file descriptor of the connection to the sound control interface. The file descriptor may be used for the poll() or select() functions (see man 2 poll or man 2 select for more details) for determining, if something can be read or write. Applications should call snd_ctl_read() if data is waiting to be read. Calling this function is highly recommended.
The file descriptor of the connection to the sound control interface on success, or a negative value if an error occurs.
See the example in Opening the mixer in the Controlling volume and balance chapter.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |