Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 8

ado_mixer_switch_new()

Create a new mixer switch

Synopsis:

#include <audio_driver.h>

ado_dswitch_t *ado_mixer_switch_new
  ( ado_mixer_t *mixer,
    char *name,
    uint32_t type,
    uint32_t subtype,
    int32_t (*read) ( MIXER_CONTEXT_T *context,
                ado_dswitch_t *dswitch,
                snd_switch_t *cswitch,
                void *instance_data ),
    int32_t (*write) ( MIXER_CONTEXT_T *context,
                ado_dswitch_t *dswitch,
                snd_switch_t *cswitch,
                void *instance_data ),
    void *instance_data,
    void (*instance_free) (void *data) );

Arguments:

mixer
A pointer to the ado_mixer_t structure that specifies the mixer to create the element in. This structure was created by ado_mixer_create().
name
The name of the element. Elements are referred to by name, so be careful; for some standard names, see <asound.h>.
type
The type of switch; one of:
subtype
The subtype of the switch; one of:
read()
A callback that reads the state of the switch.
write()
A callback that writes the state of the switch.
instance_data
A pointer to any instance data that the read and write() callbacks might need. This can be a pointer to allocated memory, in which case you'll need to define the instance_free function.
instance_free
A function that must free any allocated instance data. It's called when the element is destroyed.

Description:

The ado_mixer_switch_new() function creates a new mixer switch.


Note: A mixer switch isn't the same thing as a mixer switch element:
Mixer switch element
Used for things such as mutes and capture selects.
Mixer switch
Used less frequently, but still important to have available, e.g. PCM Loopback.

Returns:

A pointer to the newly allocated switch.

Classification:

QNX Neutrino

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

Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 186

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_mixer_switch_new.html on line 186