MPD

- Main Page
- Data Structures
- Files

- Data Structures
- Data Fields

Data Fields

# mixer_plugin Struct Reference

`#include <mixer_plugin.h>`

## Data Fields
struct mixer *(* | init )(void *ao, const struct config_param *param, GError **error_r)
| Alocates and configures a mixer device.
void(* | finish )(struct mixer *data)
| Finish and free mixer data.
bool(* | open )(struct mixer *data, GError **error_r)
| Open mixer device.
void(* | close )(struct mixer *data)
| Close mixer device.
int(* | get_volume )(struct mixer *mixer, GError **error_r)
| Reads the current volume.
bool(* | set_volume )(struct mixer *mixer, unsigned volume, GError **error_r)
| Sets the volume.
bool | global
| If true, then the mixer is automatically opened, even if its audio output is not open.

## Detailed Description

Definition at line 37 of file mixer_plugin.h.

## Field Documentation

void(* mixer_plugin::close)(struct mixer *data)

Close mixer device.

Definition at line 68 of file mixer_plugin.h.

void(* mixer_plugin::finish)(struct mixer *data)

Finish and free mixer data.

Definition at line 54 of file mixer_plugin.h.

int(* mixer_plugin::get_volume)(struct mixer *mixer, GError **error_r)

Reads the current volume.

Parameters:

  error_r | location to store the error occuring, or NULL to ignore errors

Returns:
  the current volume (0..100 including) or -1 if unavailable or on error (error_r set, mixer will be closed)

Definition at line 78 of file mixer_plugin.h.

bool mixer_plugin::global

If true, then the mixer is automatically opened, even if its audio output is not open.

If false, then the mixer is disabled as long as its audio output is closed.

Definition at line 96 of file mixer_plugin.h.

struct mixer*(* mixer_plugin::init)(void *ao, const struct config_param *param, GError **error_r)`[read]`

Alocates and configures a mixer device.

Parameters:

  ao | the pointer returned by audio_output_plugin.init
  param | the configuration section, or NULL if there is no configuration
  error_r | location to store the error occuring, or NULL to ignore errors

Returns:
  a mixer object, or NULL on error

Definition at line 48 of file mixer_plugin.h.

bool(* mixer_plugin::open)(struct mixer *data, GError **error_r)

Open mixer device.

Parameters:

  error_r | location to store the error occuring, or NULL to ignore errors

Returns:
  true on success, false on error

Definition at line 63 of file mixer_plugin.h.

bool(* mixer_plugin::set_volume)(struct mixer *mixer, unsigned volume, GError **error_r)

Sets the volume.

Parameters:

  error_r | location to store the error occuring, or NULL to ignore errors
  volume | the new volume (0..100 including)

Returns:
  true on success, false on error

Definition at line 88 of file mixer_plugin.h.

The documentation for this struct was generated from the following file:

- src/mixer_plugin.h