xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
audio_oss_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/ioctl.h>
#include <inttypes.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/audio_out.h>
#include <sys/time.h>
#include "speakers.h"

Data Structures

struct  oss_driver_s
 
struct  oss_class_t
 

Macros

#define LOG_MODULE   "audio_oss_out"
 
#define LOG_VERBOSE
 
#define SNDCTL_DSP_SETFMT   SOUND_PCM_SETFMT
 
#define SNDCTL_DSP_SPEED   SOUND_PCM_WRITE_RATE
 
#define AFMT_S16_NE   AFMT_S16_LE
 
#define AFMT_AC3   0x00000400
 
#define AO_OUT_OSS_IFACE_VERSION   9
 
#define AUDIO_NUM_FRAGMENTS   15
 
#define AUDIO_FRAGMENT_SIZE   8192
 
#define ZERO_BUF_SIZE   15360
 
#define GAP_TOLERANCE   5000
 
#define MAX_GAP   90000
 
#define OSS_SYNC_AUTO_DETECT   0
 
#define OSS_SYNC_GETODELAY   1
 
#define OSS_SYNC_GETOPTR   2
 
#define OSS_SYNC_SOFTSYNC   3
 
#define OSS_SYNC_PROBEBUFFER   4
 

Typedefs

typedef struct oss_driver_s oss_driver_t
 

Functions

static int ao_oss_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
 
static int ao_oss_num_channels (ao_driver_t *this_gen)
 
static int ao_oss_bytes_per_frame (ao_driver_t *this_gen)
 
static int ao_oss_get_gap_tolerance (ao_driver_t *this_gen)
 
static int ao_oss_delay (ao_driver_t *this_gen)
 
static int ao_oss_write (ao_driver_t *this_gen, int16_t *frame_buffer, uint32_t num_frames)
 
static void ao_oss_close (ao_driver_t *this_gen)
 
static uint32_t ao_oss_get_capabilities (ao_driver_t *this_gen)
 
static void ao_oss_exit (ao_driver_t *this_gen)
 
static int ao_oss_get_property (ao_driver_t *this_gen, int property)
 
static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value)
 
static int ao_oss_ctrl (ao_driver_t *this_gen, int cmd,...)
 
static int probe_audio_devices (oss_driver_t *this)
 
static void oss_speaker_arrangement_cb (void *user_data, xine_cfg_entry_t *entry)
 
static ao_driver_topen_plugin (audio_driver_class_t *class_gen, const void *data)
 
static void * init_class (xine_t *xine, const void *data)
 

Variables

static const ao_info_t ao_info_oss
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ AFMT_AC3

#define AFMT_AC3   0x00000400

Referenced by ao_oss_open().

◆ AFMT_S16_NE

#define AFMT_S16_NE   AFMT_S16_LE

Referenced by ao_oss_open(), and open_plugin().

◆ AO_OUT_OSS_IFACE_VERSION

#define AO_OUT_OSS_IFACE_VERSION   9

◆ AUDIO_FRAGMENT_SIZE

#define AUDIO_FRAGMENT_SIZE   8192

◆ AUDIO_NUM_FRAGMENTS

#define AUDIO_NUM_FRAGMENTS   15

◆ GAP_TOLERANCE

#define GAP_TOLERANCE   5000

◆ LOG_MODULE

#define LOG_MODULE   "audio_oss_out"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAX_GAP

#define MAX_GAP   90000

◆ OSS_SYNC_AUTO_DETECT

#define OSS_SYNC_AUTO_DETECT   0

Referenced by open_plugin().

◆ OSS_SYNC_GETODELAY

#define OSS_SYNC_GETODELAY   1

Referenced by ao_oss_delay(), and open_plugin().

◆ OSS_SYNC_GETOPTR

#define OSS_SYNC_GETOPTR   2

◆ OSS_SYNC_PROBEBUFFER

#define OSS_SYNC_PROBEBUFFER   4

Referenced by ao_oss_delay(), and open_plugin().

◆ OSS_SYNC_SOFTSYNC

#define OSS_SYNC_SOFTSYNC   3

◆ SNDCTL_DSP_SETFMT

#define SNDCTL_DSP_SETFMT   SOUND_PCM_SETFMT

Referenced by ao_oss_open(), and open_plugin().

◆ SNDCTL_DSP_SPEED

#define SNDCTL_DSP_SPEED   SOUND_PCM_WRITE_RATE

◆ ZERO_BUF_SIZE

#define ZERO_BUF_SIZE   15360

Typedef Documentation

◆ oss_driver_t

typedef struct oss_driver_s oss_driver_t

Function Documentation

◆ ao_oss_bytes_per_frame()

static int ao_oss_bytes_per_frame ( ao_driver_t * this_gen)
static

Referenced by open_plugin().

◆ ao_oss_close()

static void ao_oss_close ( ao_driver_t * this_gen)
static

Referenced by ao_oss_ctrl(), and open_plugin().

◆ ao_oss_ctrl()

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

◆ ao_oss_delay()

static int ao_oss_delay ( ao_driver_t * this_gen)
static

◆ ao_oss_exit()

static void ao_oss_exit ( ao_driver_t * this_gen)
static

References NULL.

Referenced by open_plugin().

◆ ao_oss_get_capabilities()

static uint32_t ao_oss_get_capabilities ( ao_driver_t * this_gen)
static

Referenced by open_plugin().

◆ ao_oss_get_gap_tolerance()

static int ao_oss_get_gap_tolerance ( ao_driver_t * this_gen)
static

References GAP_TOLERANCE.

Referenced by open_plugin().

◆ ao_oss_get_property()

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

◆ ao_oss_num_channels()

static int ao_oss_num_channels ( ao_driver_t * this_gen)
static

Referenced by open_plugin().

◆ ao_oss_open()

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

◆ ao_oss_set_property()

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

◆ ao_oss_write()

static int ao_oss_write ( ao_driver_t * this_gen,
int16_t * frame_buffer,
uint32_t num_frames )
static

◆ init_class()

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

◆ open_plugin()

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

◆ oss_speaker_arrangement_cb()

static void oss_speaker_arrangement_cb ( void * user_data,
xine_cfg_entry_t * entry )
static

◆ probe_audio_devices()

static int probe_audio_devices ( oss_driver_t * this)
static

References SNDCTL_DSP_SPEED.

Referenced by open_plugin().

Variable Documentation

◆ ao_info_oss

const ao_info_t ao_info_oss
static
Initial value:
= {
.priority = 9,
}

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * init_class(xine_t *xine, const void *data)
Definition audio_oss_out.c:1126
static const ao_info_t ao_info_oss
Definition audio_oss_out.c:1145
#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