xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
audio_directx_out.c File Reference
#include <windows.h>
#include <dsound.h>
#include <xine/audio_out.h>
#include <xine/xine_internal.h>

Data Structures

struct  ao_directx_t
 
struct  audiox_class_t
 

Macros

#define LOG_MODULE   "audio_directx_out"
 
#define LOG_VERBOSE
 
#define MAX_CHANNELS   6
 
#define MAX_BITS   16
 
#define MAX_SAMPLE_RATE   44100
 
#define SOUND_BUFFER_DIV   32
 
#define SOUND_BUFFER_MAX   MAX_CHANNELS * (MAX_BITS / 8) * (((MAX_SAMPLE_RATE / SOUND_BUFFER_DIV) + 1) & ~1)
 
#define DSBUFF_INIT   0
 
#define DSBUFF_LEFT   1
 
#define DSBUFF_RIGHT   2
 
#define AO_DIRECTX_IFACE_VERSION   9
 
#define IID_IDirectSoundNotify   xine_IID_IDirectSoundNotify
 

Typedefs

typedef unsigned char boolean
 

Functions

static void Error (HWND hwnd, LPCSTR szfmt,...)
 
static boolean CreateDirectSound (ao_directx_t *ao_directx)
 
static void DestroyDirectSound (ao_directx_t *ao_directx)
 
static uint32_t FillSoundBuffer (ao_directx_t *ao_directx, int code, unsigned char *samples)
 
static void DestroySoundBuffer (ao_directx_t *ao_directx)
 
static boolean CreateSoundBuffer (ao_directx_t *ao_directx)
 
static int ao_directx_control (ao_driver_t *this_gen, int cmd,...)
 
static int ao_directx_open (ao_driver_t *ao_driver, uint32_t bits, uint32_t rate, int mode)
 
static int ao_directx_num_channels (ao_driver_t *ao_driver)
 
static int ao_directx_bytes_per_frame (ao_driver_t *ao_driver)
 
static int ao_directx_get_gap_tolerance (ao_driver_t *ao_driver)
 
static int ao_directx_delay (ao_driver_t *ao_driver)
 
static int ao_directx_write (ao_driver_t *ao_driver, int16_t *frame_buffer, uint32_t num_frames)
 
static void ao_directx_close (ao_driver_t *ao_driver)
 
static uint32_t ao_directx_get_capabilities (ao_driver_t *ao_driver)
 
static void ao_directx_exit (ao_driver_t *ao_driver)
 
static int ao_directx_get_property (ao_driver_t *ao_driver, int property)
 
static int ao_directx_set_property (ao_driver_t *ao_driver, int property, int value)
 
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 GUID xine_IID_IDirectSoundNotify
 
static const ao_info_t ao_info_directx
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ AO_DIRECTX_IFACE_VERSION

#define AO_DIRECTX_IFACE_VERSION   9

◆ DSBUFF_INIT

#define DSBUFF_INIT   0

◆ DSBUFF_LEFT

#define DSBUFF_LEFT   1

◆ DSBUFF_RIGHT

#define DSBUFF_RIGHT   2

◆ IID_IDirectSoundNotify

#define IID_IDirectSoundNotify   xine_IID_IDirectSoundNotify

◆ LOG_MODULE

#define LOG_MODULE   "audio_directx_out"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAX_BITS

#define MAX_BITS   16

◆ MAX_CHANNELS

#define MAX_CHANNELS   6

◆ MAX_SAMPLE_RATE

#define MAX_SAMPLE_RATE   44100

◆ SOUND_BUFFER_DIV

#define SOUND_BUFFER_DIV   32

◆ SOUND_BUFFER_MAX

#define SOUND_BUFFER_MAX   MAX_CHANNELS * (MAX_BITS / 8) * (((MAX_SAMPLE_RATE / SOUND_BUFFER_DIV) + 1) & ~1)

Typedef Documentation

◆ boolean

typedef unsigned char boolean

Function Documentation

◆ ao_directx_bytes_per_frame()

static int ao_directx_bytes_per_frame ( ao_driver_t ao_driver)
static

References ao_directx_t::frsz.

Referenced by open_plugin().

◆ ao_directx_close()

static void ao_directx_close ( ao_driver_t ao_driver)
static

References DestroySoundBuffer(), and lprintf.

Referenced by open_plugin().

◆ ao_directx_control()

static int ao_directx_control ( ao_driver_t this_gen,
int  cmd,
  ... 
)
static

◆ ao_directx_delay()

static int ao_directx_delay ( ao_driver_t ao_driver)
static

◆ ao_directx_exit()

static void ao_directx_exit ( ao_driver_t ao_driver)
static

◆ ao_directx_get_capabilities()

static uint32_t ao_directx_get_capabilities ( ao_driver_t ao_driver)
static

◆ ao_directx_get_gap_tolerance()

static int ao_directx_get_gap_tolerance ( ao_driver_t ao_driver)
static

Referenced by open_plugin().

◆ ao_directx_get_property()

static int ao_directx_get_property ( ao_driver_t ao_driver,
int  property 
)
static

Referenced by open_plugin().

◆ ao_directx_num_channels()

static int ao_directx_num_channels ( ao_driver_t ao_driver)
static

References ao_directx_t::chnn.

Referenced by open_plugin().

◆ ao_directx_open()

static int ao_directx_open ( ao_driver_t ao_driver,
uint32_t  bits,
uint32_t  rate,
int  mode 
)
static

◆ ao_directx_set_property()

static int ao_directx_set_property ( ao_driver_t ao_driver,
int  property,
int  value 
)
static

◆ ao_directx_write()

static int ao_directx_write ( ao_driver_t ao_driver,
int16_t *  frame_buffer,
uint32_t  num_frames 
)
static

◆ CreateDirectSound()

static boolean CreateDirectSound ( ao_directx_t ao_directx)
static

References ao_directx_t::dsobj, Error(), and lprintf.

Referenced by open_plugin().

◆ CreateSoundBuffer()

static boolean CreateSoundBuffer ( ao_directx_t ao_directx)
static

◆ DestroyDirectSound()

static void DestroyDirectSound ( ao_directx_t ao_directx)
static

References ao_directx_t::dsobj, and lprintf.

Referenced by ao_directx_exit().

◆ DestroySoundBuffer()

static void DestroySoundBuffer ( ao_directx_t ao_directx)
static

◆ Error()

static void Error ( HWND  hwnd,
LPCSTR  szfmt,
  ... 
)
static

◆ FillSoundBuffer()

static uint32_t FillSoundBuffer ( ao_directx_t ao_directx,
int  code,
unsigned char *  samples 
)
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

Variable Documentation

◆ ao_info_directx

const ao_info_t ao_info_directx
static
Initial value:
= {
.priority = 1,
}

◆ 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_directx_out.c:819
static const ao_info_t ao_info_directx
Definition: audio_directx_out.c:843
#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

◆ xine_IID_IDirectSoundNotify

const GUID xine_IID_IDirectSoundNotify
static
Initial value:
= {
0xB0210783,0x89CD,0x11D0,{0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16}
}