Allocate a new mixer structure, then attach it
#include <audio_driver.h>
int32_t ado_mixer_create
( ado_card_t *card,
char *id,
ado_mixer_t **rmixer,
MIXER_CONTEXT_T *context );
- 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.
The ado_mixer_create() function
allocates a new mixer structure and attaches
it to the provided card and context.
-1 if an error occurred
(errno
is set).
Any other value indicates success.
- ENOMEM
- Not enough free memory to create a new mixer.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
ctrl_init()
in the Organization of a Driver chapter,
“Writing an analog mixer”
in the Handling Analog Audio Data chapter