xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
audio_sun_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 <sys/audioio.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
#include <inttypes.h>
#include <sys/param.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/audio_out.h>

Data Structures

struct  sun_class_t
 
struct  sun_driver_s
 

Macros

#define AUDIO_CHANNELS_MONO   1
 
#define AUDIO_CHANNELS_STEREO   2
 
#define AUDIO_PRECISION_8   8
 
#define AUDIO_PRECISION_16   16
 
#define AO_SUN_IFACE_VERSION   9
 
#define GAP_TOLERANCE   5000
 
#define GAP_NONRT_TOLERANCE   AO_MAX_GAP
 
#define NOT_REAL_TIME   -1
 

Typedefs

typedef struct sun_driver_s sun_driver_t
 

Functions

static int realtime_samplecounter_available (xine_t *xine, char *dev)
 
static int find_close_samplerate_match (int dev, int sample_rate)
 
static int find_highest_samplerate (int dev)
 
static int ao_sun_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
 
static int ao_sun_num_channels (ao_driver_t *this_gen)
 
static int ao_sun_bytes_per_frame (ao_driver_t *this_gen)
 
static int ao_sun_delay (ao_driver_t *this_gen)
 
static int ao_sun_get_gap_tolerance (ao_driver_t *this_gen)
 
static int sun_audio_write (sun_driver_t *this, char *buf, unsigned nbytes)
 
static void sun_audio_flush (sun_driver_t *this)
 
static int ao_sun_write (ao_driver_t *this_gen, int16_t *data, uint32_t num_frames)
 
static void ao_sun_close (ao_driver_t *this_gen)
 
static uint32_t ao_sun_get_capabilities (ao_driver_t *this_gen)
 
static void ao_sun_exit (ao_driver_t *this_gen)
 
static int ao_sun_get_property (ao_driver_t *this_gen, int property)
 
static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value)
 
static int ao_sun_ctrl (ao_driver_t *this_gen, int cmd,...)
 
static ao_driver_tao_sun_open_plugin (audio_driver_class_t *class_gen, const void *data)
 
static void * ao_sun_init_class (xine_t *xine, const void *data)
 

Variables

static const ao_info_t ao_info_sun
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ AO_SUN_IFACE_VERSION

#define AO_SUN_IFACE_VERSION   9

◆ AUDIO_CHANNELS_MONO

#define AUDIO_CHANNELS_MONO   1

Referenced by ao_sun_open().

◆ AUDIO_CHANNELS_STEREO

#define AUDIO_CHANNELS_STEREO   2

◆ AUDIO_PRECISION_16

#define AUDIO_PRECISION_16   16

◆ AUDIO_PRECISION_8

#define AUDIO_PRECISION_8   8

◆ GAP_NONRT_TOLERANCE

#define GAP_NONRT_TOLERANCE   AO_MAX_GAP

◆ GAP_TOLERANCE

#define GAP_TOLERANCE   5000

◆ NOT_REAL_TIME

#define NOT_REAL_TIME   -1

Referenced by ao_sun_delay().

Typedef Documentation

◆ sun_driver_t

typedef struct sun_driver_s sun_driver_t

Function Documentation

◆ ao_sun_bytes_per_frame()

static int ao_sun_bytes_per_frame ( ao_driver_t * this_gen)
static

Referenced by ao_sun_open_plugin().

◆ ao_sun_close()

static void ao_sun_close ( ao_driver_t * this_gen)
static

References sun_audio_flush().

Referenced by ao_sun_open_plugin().

◆ ao_sun_ctrl()

static int ao_sun_ctrl ( ao_driver_t * this_gen,
int cmd,
... )
static

◆ ao_sun_delay()

static int ao_sun_delay ( ao_driver_t * this_gen)
static

◆ ao_sun_exit()

static void ao_sun_exit ( ao_driver_t * this_gen)
static

Referenced by ao_sun_open_plugin().

◆ ao_sun_get_capabilities()

static uint32_t ao_sun_get_capabilities ( ao_driver_t * this_gen)
static

Referenced by ao_sun_open_plugin().

◆ ao_sun_get_gap_tolerance()

static int ao_sun_get_gap_tolerance ( ao_driver_t * this_gen)
static

References GAP_NONRT_TOLERANCE, and GAP_TOLERANCE.

Referenced by ao_sun_open_plugin().

◆ ao_sun_get_property()

static int ao_sun_get_property ( ao_driver_t * this_gen,
int property )
static

◆ ao_sun_init_class()

static void * ao_sun_init_class ( xine_t * xine,
const void * data )
static

◆ ao_sun_num_channels()

static int ao_sun_num_channels ( ao_driver_t * this_gen)
static

Referenced by ao_sun_open_plugin().

◆ ao_sun_open()

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

◆ ao_sun_open_plugin()

static ao_driver_t * ao_sun_open_plugin ( audio_driver_class_t * class_gen,
const void * data )
static

◆ ao_sun_set_property()

static int ao_sun_set_property ( ao_driver_t * this_gen,
int property,
int value )
static

◆ ao_sun_write()

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

References ao_sun_delay(), and sun_audio_write().

Referenced by ao_sun_open_plugin().

◆ find_close_samplerate_match()

static int find_close_samplerate_match ( int dev,
int sample_rate )
static

References abs.

Referenced by ao_sun_open().

◆ find_highest_samplerate()

static int find_highest_samplerate ( int dev)
static

Referenced by ao_sun_open().

◆ realtime_samplecounter_available()

static int realtime_samplecounter_available ( xine_t * xine,
char * dev )
static

◆ sun_audio_flush()

static void sun_audio_flush ( sun_driver_t * this)
static

Referenced by ao_sun_close().

◆ sun_audio_write()

static int sun_audio_write ( sun_driver_t * this,
char * buf,
unsigned nbytes )
static

Referenced by ao_sun_write().

Variable Documentation

◆ ao_info_sun

const ao_info_t ao_info_sun
static
Initial value:
= {
.priority = 10,
}

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * ao_sun_init_class(xine_t *xine, const void *data)
Definition audio_sun_out.c:1014
static const ao_info_t ao_info_sun
Definition audio_sun_out.c:1032
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
Definition xine_plugin.c:78
#define PLUGIN_NONE
Definition xine_plugin.h:29
#define PLUGIN_AUDIO_OUT
Definition xine_plugin.h:35