Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

snd_mixer_read()

Read pending mixer events

Synopsis:

#include <sys/asoundlib.h>

int snd_mixer_read(
       snd_mixer_t *handle, 
       snd_mixer_callbacks_t *callbacks );

Arguments:

handle
The handle for the mixer device. This must have been created by snd_mixer_open().
callbacks
A pointer to a snd_mixer_callbacks_t structure that defines the list of callbacks.

Library:

libasound.so

Description:

The snd_mixer_read() function reads pending mixer events from the mixer handle. As each event is read, the list of callbacks is checked for a handler for this event. If a match is found, the callback is invoked. This function is usually called when the select() library call indicates that there is data to be read on the mixer's file descriptor.

Returns:

The number of events read from the handle, or a negative value on error.

Errors:

-EBADF
Invalid file descriptor. Your handle may be corrupt.
-EINTR
The read operation was interrupted by a signal, and either no data was transferred, or the resource manager responsible for that file doesn't report partial transfers.
-EIO
An event I/O error occurred.

Classification:

QNX Neutrino

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

See also:

snd_mixer_callbacks_t, snd_mixer_eid_t, snd_mixer_file_descriptor(), snd_mixer_get_filter(), snd_mixer_set_filter()