snd_mixer_element_write()

Set a mixer element's configurable parameters

Synopsis:

#include <sys/asoundlib.h>

int snd_mixer_element_write(
       snd_mixer_t *handle, 
       snd_mixer_element_t *element );

Arguments:

handle
The handle for the mixer device. This must have been created by snd_mixer_open().
element
A pointer to a snd_mixer_element_t from which snd_mixer_element_read() sets the element's configurable parameters.

Library:

libasound.so

Description:

The snd_mixer_element_write() function writes the given snd_mixer_element_t structure to the driver.


Note: We recommend that you work with mixer groups instead of manipulating the elements directly.

Returns:

Zero on success, or a negative value on error.

Errors:

-EBUSY
The element has been modified by another application.
-EINVAL
Invalid handle or element argument.
-ENXIO
The element wasn't found.

Classification:

QNX Neutrino

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

Caveats:

The write may fail with -EBUSY if another application has modified the element, and this application hasn't read that event yet using snd_mixer_read().

See also:

snd_mixer_element_read(), snd_mixer_element_t, snd_mixer_elements()