ado_mixer_create()

Allocate a new mixer structure, then attach it

Synopsis:

#include <audio_driver.h>

int32_t ado_mixer_create
  ( ado_card_t *card,
    char *id,
    ado_mixer_t **rmixer,
    MIXER_CONTEXT_T *context );

Arguments:

card
The card argument that io-audio passed to your Audio HW DLL's ctrl_init() function (see the Organization of a Driver chapter).
id
The name of the mixer. This can be a maximum of 63 characters.
rmixer
A location where ado_mixer_create() can store a pointer to the new mixer structure. The ado_mixer_t structure is opaque to your Audio HW DLL, but you need to pass a pointer to it to the other mixer functions. You typically save this pointer in your Audio HW DLL's hardware context structure.
context
A pointer to contextual data that you want to associate with the mixer. You can define MIXER_CONTEXT_T to be whatever structure you want; by default, it's defined to be struct mixer_context. See Custom data types in the Organization of a Driver chapter.

Description:

The ado_mixer_create() function allocates a new mixer structure and attaches it to the provided card and context.

Returns:

-1 if an error occurred (errno is set). Any other value indicates success.

Errors:

ENOMEM
Not enough free memory to create a new mixer.

Classification:

QNX Neutrino

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

See also:

ctrl_init() in the Organization of a Driver chapter, Writing an analog mixer in the Handling Analog Audio Data chapter