RetroArch
Classes | Typedefs | Functions | Variables
sdl_audio.c File Reference
#include <boolean.h>
#include <rthreads/rthreads.h>
#include <queues/fifo_queue.h>
#include <retro_inline.h>
#include <retro_math.h>
#include "../audio_driver.h"
#include "../../verbosity.h"
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "SDL_audio.h"
Include dependency graph for sdl_audio.c:

Classes

struct  sdl_audio
 

Typedefs

typedef struct sdl_audio sdl_audio_t
 

Functions

static void sdl_audio_cb (void *data, Uint8 *stream, int len)
 
static INLINE int find_num_frames (int rate, int latency)
 
static voidsdl_audio_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static ssize_t sdl_audio_write (void *data, const void *buf, size_t size)
 
static bool sdl_audio_stop (void *data)
 
static bool sdl_audio_alive (void *data)
 
static bool sdl_audio_start (void *data, bool is_shutdown)
 
static void sdl_audio_set_nonblock_state (void *data, bool state)
 
static void sdl_audio_free (void *data)
 
static bool sdl_audio_use_float (void *data)
 
static size_t sdl_audio_write_avail (void *data)
 

Variables

audio_driver_t audio_sdl
 

Typedef Documentation

◆ sdl_audio_t

typedef struct sdl_audio sdl_audio_t

Function Documentation

◆ find_num_frames()

static INLINE int find_num_frames ( int  rate,
int  latency 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_audio_alive()

static bool sdl_audio_alive ( void data)
static

◆ sdl_audio_cb()

static void sdl_audio_cb ( void data,
Uint8 *  stream,
int  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_audio_free()

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

◆ sdl_audio_init()

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

◆ sdl_audio_set_nonblock_state()

static void sdl_audio_set_nonblock_state ( void data,
bool  state 
)
static

◆ sdl_audio_start()

static bool sdl_audio_start ( void data,
bool  is_shutdown 
)
static

◆ sdl_audio_stop()

static bool sdl_audio_stop ( void data)
static

◆ sdl_audio_use_float()

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

◆ sdl_audio_write()

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

◆ sdl_audio_write_avail()

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

Variable Documentation

◆ audio_sdl

audio_driver_t audio_sdl
Initial value:
= {
"sdl",
}
static void * sdl_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: sdl_audio.c:70
static void sdl_audio_free(void *data)
Definition: sdl_audio.c:226
static bool sdl_audio_alive(void *data)
Definition: sdl_audio.c:202
static bool sdl_audio_start(void *data, bool is_shutdown)
Definition: sdl_audio.c:210
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool sdl_audio_use_float(void *data)
Definition: sdl_audio.c:244
static bool sdl_audio_stop(void *data)
Definition: sdl_audio.c:194
static size_t sdl_audio_write_avail(void *data)
Definition: sdl_audio.c:250
static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
Definition: sdl_audio.c:144
static void sdl_audio_set_nonblock_state(void *data, bool state)
Definition: sdl_audio.c:219