RetroArch
Classes | Macros | Functions | Variables
wiiu_audio.c File Reference
#include <string.h>
#include <malloc.h>
#include <stdint.h>
#include <wiiu/os.h>
#include <wiiu/ax.h>
#include "wiiu/wiiu_dbg.h"
#include "wiiu/system/memory.h"
#include "audio/audio_driver.h"
Include dependency graph for wiiu_audio.c:

Classes

struct  ax_audio_t
 

Macros

#define AX_AUDIO_COUNT   3072
 
#define AX_AUDIO_SIZE   (AX_AUDIO_COUNT << 1u)
 
#define AX_AUDIO_SAMPLE_COUNT   144 /* 3ms */
 
#define AX_AUDIO_SAMPLE_MIN   (AX_AUDIO_SAMPLE_COUNT * 3) /* 9ms */
 
#define AX_AUDIO_SAMPLE_LOAD   (AX_AUDIO_SAMPLE_COUNT * 10)/* 30ms */
 
#define AX_AUDIO_MAX_FREE   (AX_AUDIO_COUNT - (AX_AUDIO_SAMPLE_COUNT * 2))
 
#define AX_AUDIO_RATE   48000
 

Functions

void wiiu_ax_callback (void)
 
void AXRegisterFrameCallback (void *cb)
 
static voidax_audio_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static void ax_audio_free (void *data)
 
static bool ax_audio_stop (void *data)
 
static int ax_audio_limit (int in)
 
static bool ax_audio_start (void *data, bool is_shutdown)
 
static ssize_t ax_audio_write (void *data, const void *buf, size_t size)
 
static bool ax_audio_alive (void *data)
 
static void ax_audio_set_nonblock_state (void *data, bool state)
 
static bool ax_audio_use_float (void *data)
 
static size_t ax_audio_write_avail (void *data)
 
static size_t ax_audio_buffer_size (void *data)
 

Variables

static volatile ax_audio_twiiu_cb_ax = NULL
 
audio_driver_t audio_ax
 

Macro Definition Documentation

◆ AX_AUDIO_COUNT

#define AX_AUDIO_COUNT   3072

◆ AX_AUDIO_MAX_FREE

#define AX_AUDIO_MAX_FREE   (AX_AUDIO_COUNT - (AX_AUDIO_SAMPLE_COUNT * 2))

◆ AX_AUDIO_RATE

#define AX_AUDIO_RATE   48000

◆ AX_AUDIO_SAMPLE_COUNT

#define AX_AUDIO_SAMPLE_COUNT   144 /* 3ms */

◆ AX_AUDIO_SAMPLE_LOAD

#define AX_AUDIO_SAMPLE_LOAD   (AX_AUDIO_SAMPLE_COUNT * 10)/* 30ms */

◆ AX_AUDIO_SAMPLE_MIN

#define AX_AUDIO_SAMPLE_MIN   (AX_AUDIO_SAMPLE_COUNT * 3) /* 9ms */

◆ AX_AUDIO_SIZE

#define AX_AUDIO_SIZE   (AX_AUDIO_COUNT << 1u)

Function Documentation

◆ ax_audio_alive()

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

◆ ax_audio_buffer_size()

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

◆ ax_audio_free()

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

◆ ax_audio_init()

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

◆ ax_audio_limit()

static int ax_audio_limit ( int  in)
static
Here is the caller graph for this function:

◆ ax_audio_set_nonblock_state()

static void ax_audio_set_nonblock_state ( void data,
bool  state 
)
static

◆ ax_audio_start()

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

◆ ax_audio_stop()

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

◆ ax_audio_use_float()

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

◆ ax_audio_write()

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

◆ ax_audio_write_avail()

static size_t ax_audio_write_avail ( void data)
static

◆ AXRegisterFrameCallback()

void AXRegisterFrameCallback ( void cb)
Here is the caller graph for this function:

◆ wiiu_ax_callback()

void wiiu_ax_callback ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ audio_ax

audio_driver_t audio_ax
Initial value:
=
{
"AX",
NULL,
NULL,
NULL,
NULL,
}
static void ax_audio_set_nonblock_state(void *data, bool state)
Definition: wiiu_audio.c:292
static bool ax_audio_use_float(void *data)
Definition: wiiu_audio.c:300
static bool ax_audio_stop(void *data)
Definition: wiiu_audio.c:159
static ssize_t ax_audio_write(void *data, const void *buf, size_t size)
Definition: wiiu_audio.c:194
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * ax_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: wiiu_audio.c:79
static void ax_audio_free(void *data)
Definition: wiiu_audio.c:145
static bool ax_audio_start(void *data, bool is_shutdown)
Definition: wiiu_audio.c:176
static bool ax_audio_alive(void *data)
Definition: wiiu_audio.c:286

◆ wiiu_cb_ax

volatile ax_audio_t* wiiu_cb_ax = NULL
static