RetroArch
Classes | Macros | Typedefs | Functions | Variables
alsa.c File Reference
#include <stdlib.h>
#include <lists/string_list.h>
#include <string/stdstring.h>
#include <alsa/asoundlib.h>
#include "../audio_driver.h"
#include "../../verbosity.h"
Include dependency graph for alsa.c:

Classes

struct  alsa
 

Macros

#define BYTES_TO_FRAMES(bytes, frame_bits)   ((bytes) * 8 / frame_bits)
 
#define FRAMES_TO_BYTES(frames, frame_bits)   ((frames) * frame_bits / 8)
 

Typedefs

typedef struct alsa alsa_t
 

Functions

static bool alsa_use_float (void *data)
 
static bool find_float_format (snd_pcm_t *pcm, void *data)
 
static voidalsa_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static ssize_t alsa_write (void *data, const void *buf_, size_t size_)
 
static bool alsa_alive (void *data)
 
static bool alsa_stop (void *data)
 
static void alsa_set_nonblock_state (void *data, bool state)
 
static bool alsa_start (void *data, bool is_shutdown)
 
static void alsa_free (void *data)
 
static size_t alsa_write_avail (void *data)
 
static size_t alsa_buffer_size (void *data)
 
static voidalsa_device_list_new (void *data)
 
static void alsa_device_list_free (void *data, void *array_list_data)
 

Variables

audio_driver_t audio_alsa
 

Macro Definition Documentation

◆ BYTES_TO_FRAMES

#define BYTES_TO_FRAMES (   bytes,
  frame_bits 
)    ((bytes) * 8 / frame_bits)

◆ FRAMES_TO_BYTES

#define FRAMES_TO_BYTES (   frames,
  frame_bits 
)    ((frames) * frame_bits / 8)

Typedef Documentation

◆ alsa_t

typedef struct alsa alsa_t

Function Documentation

◆ alsa_alive()

static bool alsa_alive ( void data)
static

◆ alsa_buffer_size()

static size_t alsa_buffer_size ( void data)
static

◆ alsa_device_list_free()

static void alsa_device_list_free ( void data,
void array_list_data 
)
static
Here is the call graph for this function:

◆ alsa_device_list_new()

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

◆ alsa_free()

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

◆ alsa_init()

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

◆ alsa_set_nonblock_state()

static void alsa_set_nonblock_state ( void data,
bool  state 
)
static

◆ alsa_start()

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

◆ alsa_stop()

static bool alsa_stop ( void data)
static

◆ alsa_use_float()

static bool alsa_use_float ( void data)
static

◆ alsa_write()

static ssize_t alsa_write ( void data,
const void buf_,
size_t  size_ 
)
static

◆ alsa_write_avail()

static size_t alsa_write_avail ( void data)
static

◆ find_float_format()

static bool find_float_format ( snd_pcm_t *  pcm,
void data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ audio_alsa

audio_driver_t audio_alsa
Initial value:
= {
"alsa",
}
static void alsa_device_list_free(void *data, void *array_list_data)
Definition: alsa.c:396
static bool alsa_use_float(void *data)
Definition: alsa.c:38
static void alsa_set_nonblock_state(void *data, bool state)
Definition: alsa.c:287
static bool alsa_alive(void *data)
Definition: alsa.c:261
static void * alsa_device_list_new(void *data)
Definition: alsa.c:348
static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
Definition: alsa.c:183
static size_t alsa_buffer_size(void *data)
Definition: alsa.c:342
static void alsa_free(void *data)
Definition: alsa.c:314
static void * alsa_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: alsa.c:58
static size_t alsa_write_avail(void *data)
Definition: alsa.c:331
static bool alsa_start(void *data, bool is_shutdown)
Definition: alsa.c:293
static bool alsa_stop(void *data)
Definition: alsa.c:269