MPD

- Main Page
- Data Structures
- Files

- Data Structures
- Data Fields

Data Fields

# audio_output Struct Reference

`#include <output_internal.h>`

## Data Fields
const char * | name
| The device's configured display name.
struct audio_output_plugin * | plugin
| The plugin which implements this output device.
void * | data
| The plugin's internal data.
struct mixer * | mixer
| The mixer object associated with this audio output device.
bool | always_on
| Shall this output always play something (i.e.
bool | enabled
| Has the user enabled this device?
bool | really_enabled
| Is this device actually enabled, i.e.
bool | open
| Is the device (already) open and functional?
bool | pause
| Is the device paused? i.e.
GTimer * | fail_timer
| If not NULL, the device has failed, and this timer is used to estimate how long it should stay disabled (unless explicitly reopened with "play").
struct audio_format | config_audio_format
| The configured audio format.
struct audio_format | in_audio_format
| The audio_format in which audio data is received from the player thread (which in turn receives it from the decoder).
struct audio_format | out_audio_format
| The audio_format which is really sent to the device.
struct pcm_buffer | cross_fade_buffer
| The buffer used to allocate the cross-fading result.
struct filter * | filter
| The filter object of this audio output.
struct filter * | replay_gain_filter
| The replay_gain_filter_plugin instance of this audio output.
unsigned | replay_gain_serial
| The serial number of the last replay gain info.
struct filter * | other_replay_gain_filter
| The replay_gain_filter_plugin instance of this audio output, to be applied to the second chunk during cross-fading.
unsigned | other_replay_gain_serial
| The serial number of the last replay gain info by the "other" chunk during cross-fading.
struct filter * | convert_filter
| The convert_filter_plugin instance of this audio output.
GThread * | thread
| The thread handle, or NULL if the output thread isn't running.
enum audio_output_command | command
| The next command to be performed by the output thread.
struct music_pipe * | pipe
| The music pipe which provides music chunks to be played.
GMutex * | mutex
| This mutex protects open, fail_timer, chunk and chunk_finished.
GCond * | cond
| This condition object wakes up the output thread after command has been set.
struct music_chunk * | chunk
| The music_chunk which is currently being played.
bool | chunk_finished
| Has the output finished playing chunk?

## Detailed Description

Definition at line 55 of file output_internal.h.

## Field Documentation

bool audio_output::always_on

Shall this output always play something (i.e.

silence), even when playback is stopped?

Definition at line 83 of file output_internal.h.

struct music_chunk* audio_output::chunk

The music_chunk which is currently being played.

All chunks before this one may be returned to the #music_buffer, because they are not going to be used by this output anymore.

Definition at line 216 of file output_internal.h.

bool audio_output::chunk_finished

Has the output finished playing chunk?

Definition at line 221 of file output_internal.h.

enum audio_output_command audio_output::command

The next command to be performed by the output thread.

Definition at line 191 of file output_internal.h.

GCond* audio_output::cond

This condition object wakes up the output thread after command has been set.

Definition at line 208 of file output_internal.h.

struct audio_format audio_output::config_audio_format

The configured audio format.

Definition at line 122 of file output_internal.h.

struct filter* audio_output::convert_filter

The convert_filter_plugin instance of this audio output.

It is the last item in the filter chain, and is responsible for converting the input data into the appropriate format for this audio output.

Definition at line 180 of file output_internal.h.

struct pcm_buffer audio_output::cross_fade_buffer

The buffer used to allocate the cross-fading result.

Definition at line 141 of file output_internal.h.

void* audio_output::data

The plugin's internal data.

It is passed to every plugin method.

Definition at line 70 of file output_internal.h.

bool audio_output::enabled

Has the user enabled this device?

Definition at line 88 of file output_internal.h.

GTimer* audio_output::fail_timer

If not NULL, the device has failed, and this timer is used to estimate how long it should stay disabled (unless explicitly reopened with "play").

Definition at line 117 of file output_internal.h.

struct filter* audio_output::filter

The filter object of this audio output.

This is an instance of chain_filter_plugin.

Definition at line 147 of file output_internal.h.

struct audio_format audio_output::in_audio_format

The audio_format in which audio data is received from the player thread (which in turn receives it from the decoder).

Definition at line 128 of file output_internal.h.

struct mixer* audio_output::mixer

The mixer object associated with this audio output device.

May be NULL if none is available, or if software volume is configured.

Definition at line 77 of file output_internal.h.

GMutex* audio_output::mutex

This mutex protects open, fail_timer, chunk and chunk_finished.

Definition at line 202 of file output_internal.h.

const char* audio_output::name

The device's configured display name.

Definition at line 59 of file output_internal.h.

bool audio_output::open

Is the device (already) open and functional?

This attribute may only be modified by the output thread. It is protected with mutex: write accesses inside the output thread and read accesses outside of it may only be performed while the lock is held.

Definition at line 104 of file output_internal.h.

struct filter* audio_output::other_replay_gain_filter

The replay_gain_filter_plugin instance of this audio output, to be applied to the second chunk during cross-fading.

Definition at line 166 of file output_internal.h.

unsigned audio_output::other_replay_gain_serial

The serial number of the last replay gain info by the "other" chunk during cross-fading.

Definition at line 172 of file output_internal.h.

struct audio_format audio_output::out_audio_format

The audio_format which is really sent to the device.

This is basically config_audio_format (if configured) or in_audio_format, but may have been modified by plugin->open().

Definition at line 136 of file output_internal.h.

bool audio_output::pause

Is the device paused? i.e.

the output thread is in the ao_pause() loop.

Definition at line 110 of file output_internal.h.

struct music_pipe* audio_output::pipe

The music pipe which provides music chunks to be played.

Definition at line 196 of file output_internal.h.

struct audio_output_plugin* audio_output::plugin

The plugin which implements this output device.

Definition at line 64 of file output_internal.h.

bool audio_output::really_enabled

Is this device actually enabled, i.e.

the "enable" method has succeeded?

Definition at line 94 of file output_internal.h.

struct filter* audio_output::replay_gain_filter

The replay_gain_filter_plugin instance of this audio output.

Definition at line 153 of file output_internal.h.

unsigned audio_output::replay_gain_serial

The serial number of the last replay gain info.

0 means no replay gain info was available.

Definition at line 159 of file output_internal.h.

GThread* audio_output::thread

The thread handle, or NULL if the output thread isn't running.

Definition at line 186 of file output_internal.h.

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

- src/output_internal.h