RetroArch
Classes | Macros | Typedefs | Functions | Variables
dsound.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <windows.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <dsound.h>
#include <boolean.h>
#include <retro_inline.h>
#include <retro_miscellaneous.h>
#include <retro_timers.h>
#include <queues/fifo_queue.h>
#include "../audio_driver.h"
#include "../../verbosity.h"
Include dependency graph for dsound.c:

Classes

struct  dsound
 
struct  audio_lock
 
struct  dsound_dev
 

Macros

#define CHUNK_SIZE   256
 

Typedefs

typedef struct dsound dsound_t
 

Functions

static INLINE unsigned write_avail (unsigned read_ptr, unsigned write_ptr, unsigned buffer_size)
 
static INLINE void get_positions (dsound_t *ds, DWORD *read_ptr, DWORD *write_ptr)
 
static INLINE bool grab_region (dsound_t *ds, uint32_t write_ptr, struct audio_lock *region)
 
static INLINE void release_region (dsound_t *ds, const struct audio_lock *region)
 
static DWORD CALLBACK dsound_thread (PVOID data)
 
static void dsound_stop_thread (dsound_t *ds)
 
static bool dsound_start_thread (dsound_t *ds)
 
static void dsound_clear_buffer (dsound_t *ds)
 
static void dsound_free (void *data)
 
static BOOL CALLBACK enumerate_cb (LPGUID guid, LPCSTR desc, LPCSTR module, LPVOID context)
 
static voiddsound_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static bool dsound_stop (void *data)
 
static bool dsound_start (void *data, bool is_shutdown)
 
static bool dsound_alive (void *data)
 
static void dsound_set_nonblock_state (void *data, bool state)
 
static ssize_t dsound_write (void *data, const void *buf_, size_t size)
 
static size_t dsound_write_avail (void *data)
 
static size_t dsound_buffer_size (void *data)
 
static bool dsound_use_float (void *data)
 

Variables

audio_driver_t audio_dsound
 

Macro Definition Documentation

◆ CHUNK_SIZE

#define CHUNK_SIZE   256

Typedef Documentation

◆ dsound_t

typedef struct dsound dsound_t

Function Documentation

◆ dsound_alive()

static bool dsound_alive ( void data)
static

◆ dsound_buffer_size()

static size_t dsound_buffer_size ( void data)
static

◆ dsound_clear_buffer()

static void dsound_clear_buffer ( dsound_t ds)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsound_free()

static void dsound_free ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsound_init()

static void* dsound_init ( const char *  device,
unsigned  rate,
unsigned  latency,
unsigned  block_frames,
unsigned *  new_rate 
)
static
Here is the call graph for this function:

◆ dsound_set_nonblock_state()

static void dsound_set_nonblock_state ( void data,
bool  state 
)
static

◆ dsound_start()

static bool dsound_start ( void data,
bool  is_shutdown 
)
static
Here is the call graph for this function:

◆ dsound_start_thread()

static bool dsound_start_thread ( dsound_t ds)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsound_stop()

static bool dsound_stop ( void data)
static
Here is the call graph for this function:

◆ dsound_stop_thread()

static void dsound_stop_thread ( dsound_t ds)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsound_thread()

static DWORD CALLBACK dsound_thread ( PVOID  data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsound_use_float()

static bool dsound_use_float ( void data)
static
Here is the call graph for this function:

◆ dsound_write()

static ssize_t dsound_write ( void data,
const void buf_,
size_t  size 
)
static
Here is the call graph for this function:

◆ dsound_write_avail()

static size_t dsound_write_avail ( void data)
static
Here is the call graph for this function:

◆ enumerate_cb()

static BOOL CALLBACK enumerate_cb ( LPGUID  guid,
LPCSTR  desc,
LPCSTR  module,
LPVOID  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_positions()

static INLINE void get_positions ( dsound_t ds,
DWORD *  read_ptr,
DWORD *  write_ptr 
)
static
Here is the caller graph for this function:

◆ grab_region()

static INLINE bool grab_region ( dsound_t ds,
uint32_t  write_ptr,
struct audio_lock region 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ release_region()

static INLINE void release_region ( dsound_t ds,
const struct audio_lock region 
)
static
Here is the caller graph for this function:

◆ write_avail()

static INLINE unsigned write_avail ( unsigned  read_ptr,
unsigned  write_ptr,
unsigned  buffer_size 
)
static
Here is the caller graph for this function:

Variable Documentation

◆ audio_dsound

audio_driver_t audio_dsound
Initial value:
= {
"dsound",
}
static bool dsound_alive(void *data)
Definition: dsound.c:444
static size_t dsound_write_avail(void *data)
Definition: dsound.c:495
static size_t dsound_buffer_size(void *data)
Definition: dsound.c:506
static void * dsound_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: dsound.c:332
static ssize_t dsound_write(void *data, const void *buf_, size_t size)
Definition: dsound.c:460
static void dsound_set_nonblock_state(void *data, bool state)
Definition: dsound.c:453
static bool dsound_start(void *data, bool is_shutdown)
Definition: dsound.c:430
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool dsound_stop(void *data)
Definition: dsound.c:420
static bool dsound_use_float(void *data)
Definition: dsound.c:511
static void dsound_free(void *data)
Definition: dsound.c:275