xine-lib 1.2.13-20230125hg15249
|
#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_t * | open_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 |
#define AFMT_AC3 0x00000400 |
Referenced by ao_oss_open().
#define AFMT_S16_NE AFMT_S16_LE |
Referenced by ao_oss_open(), and open_plugin().
#define AO_OUT_OSS_IFACE_VERSION 9 |
#define AUDIO_FRAGMENT_SIZE 8192 |
#define AUDIO_NUM_FRAGMENTS 15 |
#define GAP_TOLERANCE 5000 |
Referenced by ao_oss_get_gap_tolerance().
#define LOG_MODULE "audio_oss_out" |
#define LOG_VERBOSE |
#define MAX_GAP 90000 |
#define OSS_SYNC_AUTO_DETECT 0 |
Referenced by open_plugin().
#define OSS_SYNC_GETODELAY 1 |
Referenced by ao_oss_delay(), and open_plugin().
#define OSS_SYNC_GETOPTR 2 |
Referenced by ao_oss_ctrl(), ao_oss_delay(), and open_plugin().
#define OSS_SYNC_PROBEBUFFER 4 |
Referenced by ao_oss_delay(), and open_plugin().
#define OSS_SYNC_SOFTSYNC 3 |
Referenced by ao_oss_ctrl(), ao_oss_delay(), ao_oss_write(), and open_plugin().
#define SNDCTL_DSP_SETFMT SOUND_PCM_SETFMT |
Referenced by ao_oss_open(), and open_plugin().
#define SNDCTL_DSP_SPEED SOUND_PCM_WRITE_RATE |
Referenced by ao_oss_open(), open_plugin(), and probe_audio_devices().
#define ZERO_BUF_SIZE 15360 |
typedef struct oss_driver_s oss_driver_t |
|
static |
Referenced by open_plugin().
|
static |
Referenced by ao_oss_ctrl(), and open_plugin().
|
static |
References AO_CTRL_FLUSH_BUFFERS, AO_CTRL_PLAY_PAUSE, AO_CTRL_PLAY_RESUME, ao_oss_close(), ao_oss_open(), lprintf, mode(), NULL, OSS_SYNC_GETOPTR, and OSS_SYNC_SOFTSYNC.
Referenced by open_plugin().
|
static |
References lprintf, NULL, OSS_SYNC_GETODELAY, OSS_SYNC_GETOPTR, OSS_SYNC_PROBEBUFFER, OSS_SYNC_SOFTSYNC, and xine_monotonic_clock().
Referenced by open_plugin().
|
static |
References NULL.
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
References GAP_TOLERANCE.
Referenced by open_plugin().
|
static |
References AO_PROP_MIXER_VOL, AO_PROP_MUTE_VOL, AO_PROP_PCM_VOL, IOCTL_REQUEST_TYPE, and v.
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
References _, AFMT_AC3, AFMT_S16_NE, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_A52, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, bits, lprintf, mode(), SNDCTL_DSP_SETFMT, SNDCTL_DSP_SPEED, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ao_oss_ctrl(), and open_plugin().
|
static |
References ao_oss_set_property(), AO_PROP_MIXER_VOL, AO_PROP_MUTE_VOL, AO_PROP_PCM_VOL, IOCTL_REQUEST_TYPE, and v.
Referenced by ao_oss_set_property(), and open_plugin().
|
static |
References lprintf, NULL, OSS_SYNC_SOFTSYNC, and xine_monotonic_clock().
Referenced by open_plugin().
|
static |
|
static |
References _, A52_PASSTHRU, AFMT_S16_NE, AO_CAP_8BITS, AO_CAP_MIXER_VOL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_A52, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, AO_CAP_MUTE_VOL, AO_CAP_NO_UNPAUSE, AO_CAP_PCM_VOL, ao_oss_bytes_per_frame(), ao_oss_close(), ao_oss_ctrl(), ao_oss_delay(), ao_oss_exit(), ao_oss_get_capabilities(), ao_oss_get_gap_tolerance(), ao_oss_get_property(), ao_oss_num_channels(), ao_oss_open(), ao_oss_set_property(), ao_oss_write(), AO_PROP_MIXER_VOL, AO_PROP_PCM_VOL, AUDIO_DEVICE_SPEAKER_ARRANGEMENT_HELP, AUDIO_DEVICE_SPEAKER_ARRANGEMENT_TYPES, xine_s::config, NULL, oss_speaker_arrangement_cb(), OSS_SYNC_AUTO_DETECT, OSS_SYNC_GETODELAY, OSS_SYNC_GETOPTR, OSS_SYNC_PROBEBUFFER, OSS_SYNC_SOFTSYNC, probe_audio_devices(), SNDCTL_DSP_SETFMT, SNDCTL_DSP_SPEED, STEREO, SURROUND4, SURROUND5, SURROUND51, config_values_s::xine, oss_class_t::xine, xine_monotonic_clock(), xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_class().
|
static |
References A52_PASSTHRU, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_A52, AO_CAP_MODE_AC5, xine_cfg_entry_s::num_value, SURROUND4, SURROUND41, SURROUND5, SURROUND51, and user_data().
Referenced by open_plugin().
|
static |
References SNDCTL_DSP_SPEED.
Referenced by open_plugin().
|
static |
const plugin_info_t xine_plugin_info [] EXPORTED |