xine-lib: xine-lib-1.2.12/src/audio_out/audio_sndio_out.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
audio_sndio_out.c File Reference
`#include <stdio.h>`
`#include <errno.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <fcntl.h>`
`#include <math.h>`
`#include <unistd.h>`
`#include <inttypes.h>`
`#include <pthread.h>`
`#include <sndio.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/audio_out.h>`
`#include "bswap.h"`

## Data Structures
struct | sndio_class_t
struct | sndio_driver_s

## Macros
#define | GAP_TOLERANCE AO_MAX_GAP
#define | PCT_TO_MIDI(p) (((p) * SIO_MAXVOL + 50) / 100)

## Typedefs
typedef struct sndio_driver_s | sndio_driver_t

## Functions
static void | ao_sndio_onmove_cb (void *addr, int delta)
static int | ao_sndio_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
static int | ao_sndio_num_channels (ao_driver_t *this_gen)
static int | ao_sndio_bytes_per_frame (ao_driver_t *this_gen)
static int | ao_sndio_get_gap_tolerance (ao_driver_t *this_gen)
static int | ao_sndio_write (ao_driver_t *this_gen, int16_t *data, uint32_t num_frames)
static int | ao_sndio_delay (ao_driver_t *this_gen)
static void | ao_sndio_close (ao_driver_t *this_gen)
static uint32_t | ao_sndio_get_capabilities (ao_driver_t *this_gen)
static void | ao_sndio_exit (ao_driver_t *this_gen)
static int | ao_sndio_get_property (ao_driver_t *this_gen, int property)
static int | ao_sndio_set_property (ao_driver_t *this_gen, int property, int value)
static int | ao_sndio_ctrl (ao_driver_t *this_gen, int cmd,...)
static ao_driver_t * | open_plugin (audio_driver_class_t *class_gen, const void *data)
static void | dispose_class (audio_driver_class_t *this_gen)
static void * | init_class (xine_t *xine, const void *data)

## Variables
static const ao_info_t | ao_info_sndio
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ GAP_TOLERANCE

#define GAP_TOLERANCE AO_MAX_GAP

## ◆ PCT_TO_MIDI

#define PCT_TO_MIDI | ( |  | p | ) | (((p) * SIO_MAXVOL + 50) / 100)

## Typedef Documentation

## ◆ sndio_driver_t

typedef struct sndio_driver_s sndio_driver_t

## Function Documentation

## ◆ ao_sndio_bytes_per_frame()

static int ao_sndio_bytes_per_frame | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ ao_sndio_close()

static void ao_sndio_close | ( | ao_driver_t * | this_gen | ) |
| static

References NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ ao_sndio_ctrl()

static int ao_sndio_ctrl | ( | ao_driver_t * | this_gen,
|  | int | cmd,
|  |  | ...
| ) |  |
| static

Referenced by open_plugin().

## ◆ ao_sndio_delay()

static int ao_sndio_delay | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ ao_sndio_exit()

static void ao_sndio_exit | ( | ao_driver_t * | this_gen | ) |
| static

References NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ ao_sndio_get_capabilities()

static uint32_t ao_sndio_get_capabilities | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ ao_sndio_get_gap_tolerance()

static int ao_sndio_get_gap_tolerance | ( | ao_driver_t * | this_gen | ) |
| static

References GAP_TOLERANCE.

Referenced by open_plugin().

## ◆ ao_sndio_get_property()

static int ao_sndio_get_property | ( | ao_driver_t * | this_gen,
|  | int | property
| ) |  |
| static

References AO_PROP_MIXER_VOL, and AO_PROP_MUTE_VOL.

Referenced by open_plugin().

## ◆ ao_sndio_num_channels()

static int ao_sndio_num_channels | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by open_plugin().

## ◆ ao_sndio_onmove_cb()

static void ao_sndio_onmove_cb | ( | void * | addr,
|  | int | delta
| ) |  |
| static

Referenced by ao_sndio_open().

## ◆ ao_sndio_open()

static int ao_sndio_open | ( | ao_driver_t * | this_gen,
|  | uint32_t | bits,
|  | uint32_t | rate,
|  | int | mode
| ) |  |
| static

References AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, ao_sndio_onmove_cb(), bits, mode(), NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ ao_sndio_set_property()

static int ao_sndio_set_property | ( | ao_driver_t * | this_gen,
|  | int | property,
|  | int | value
| ) |  |
| static

References AO_PROP_MIXER_VOL, AO_PROP_MUTE_VOL, NULL, and PCT_TO_MIDI.

Referenced by open_plugin().

## ◆ ao_sndio_write()

static int ao_sndio_write | ( | ao_driver_t * | this_gen,
|  | int16_t * | data,
|  | uint32_t | num_frames
| ) |  |
| static

Referenced by open_plugin().

## ◆ dispose_class()

static void dispose_class | ( | audio_driver_class_t * | this_gen | ) |
| static

Referenced by init_class().

## ◆ init_class()

static void * init_class | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References audio_driver_class_s::description, audio_driver_class_s::dispose, dispose_class(), sndio_class_t::driver_class, audio_driver_class_s::identifier, lprintf, N_, NULL, open_plugin(), audio_driver_class_s::open_plugin, and sndio_class_t::xine.

## ◆ open_plugin()

static ao_driver_t * open_plugin | ( | audio_driver_class_t * | class_gen,
|  | const void * | data
| ) |  |
| static

References AO_CAP_16BITS, AO_CAP_8BITS, AO_CAP_MIXER_VOL, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, AO_CAP_MUTE_VOL, ao_sndio_bytes_per_frame(), ao_sndio_close(), ao_sndio_ctrl(), ao_sndio_delay(), ao_sndio_exit(), ao_sndio_get_capabilities(), ao_sndio_get_gap_tolerance(), ao_sndio_get_property(), ao_sndio_num_channels(), ao_sndio_open(), ao_sndio_set_property(), ao_sndio_write(), lprintf, NULL, and sndio_class_t::xine.

Referenced by init_class().

## Variable Documentation

## ◆ ao_info_sndio

const ao_info_t ao_info_sndio
| static

Initial value:
= {
.priority = 12,
}

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_AUDIO_OUT, 9, "sndio", XINE_VERSION_CODE, &ao_info_sndio, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition: audio_sndio_out.c:368
ao_info_sndio
static const ao_info_t ao_info_sndio
Definition: audio_sndio_out.c:388
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_AUDIO_OUT
#define PLUGIN_AUDIO_OUT
Definition: xine_plugin.h:35