RetroArch
Classes | Macros | Typedefs | Functions | Variables
ps2_audio.c File Reference
#include <stdint.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <kernel.h>
#include <audsrv.h>
#include "../audio_driver.h"
Include dependency graph for ps2_audio.c:

Classes

struct  ps2_audio
 

Macros

#define AUDIO_OUT_BUFFER   2 * 1024
 
#define AUDIO_BUFFER   64 * 1024
 
#define AUDIO_CHANNELS   2
 
#define AUDIO_BITS   16
 
#define AUDIO_PRIORITY   0x7F /* LOWER VALUE GRATHER PRIORITY*/
 

Typedefs

typedef struct ps2_audio ps2_audio_t
 

Functions

static u8 audioThreadStack [4 *1024] __attribute__ ((aligned(16)))
 
static void audioMainLoop (void *data)
 
static void audioCreateThread (ps2_audio_t *ps2)
 
static void audioStopNDeleteThread (ps2_audio_t *ps2)
 
static void audioConfigure (ps2_audio_t *ps2, unsigned rate)
 
static void audioCreateSemas (ps2_audio_t *ps2)
 
static voidps2_audio_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static void ps2_audio_free (void *data)
 
static ssize_t ps2_audio_write (void *data, const void *buf, size_t size)
 
static bool ps2_audio_alive (void *data)
 
static bool ps2_audio_stop (void *data)
 
static bool ps2_audio_start (void *data, bool is_shutdown)
 
static void ps2_audio_set_nonblock_state (void *data, bool toggle)
 
static bool ps2_audio_use_float (void *data)
 
static size_t ps2_audio_write_avail (void *data)
 
static size_t ps2_audio_buffer_size (void *data)
 

Variables

static ps2_audio_tbackup_ps2
 
audio_driver_t audio_ps2
 

Macro Definition Documentation

◆ AUDIO_BITS

#define AUDIO_BITS   16

◆ AUDIO_BUFFER

#define AUDIO_BUFFER   64 * 1024

◆ AUDIO_CHANNELS

#define AUDIO_CHANNELS   2

◆ AUDIO_OUT_BUFFER

#define AUDIO_OUT_BUFFER   2 * 1024

◆ AUDIO_PRIORITY

#define AUDIO_PRIORITY   0x7F /* LOWER VALUE GRATHER PRIORITY*/

Typedef Documentation

◆ ps2_audio_t

typedef struct ps2_audio ps2_audio_t

Function Documentation

◆ __attribute__()

static u8 audioThreadStack [4 * 1024] __attribute__ ( (aligned(16))  )
static

◆ audioConfigure()

static void audioConfigure ( ps2_audio_t ps2,
unsigned  rate 
)
static
Here is the caller graph for this function:

◆ audioCreateSemas()

static void audioCreateSemas ( ps2_audio_t ps2)
static
Here is the caller graph for this function:

◆ audioCreateThread()

static void audioCreateThread ( ps2_audio_t ps2)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audioMainLoop()

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

◆ audioStopNDeleteThread()

static void audioStopNDeleteThread ( ps2_audio_t ps2)
static
Here is the caller graph for this function:

◆ ps2_audio_alive()

static bool ps2_audio_alive ( void data)
static

◆ ps2_audio_buffer_size()

static size_t ps2_audio_buffer_size ( void data)
static

◆ ps2_audio_free()

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

◆ ps2_audio_init()

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

◆ ps2_audio_set_nonblock_state()

static void ps2_audio_set_nonblock_state ( void data,
bool  toggle 
)
static

◆ ps2_audio_start()

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

◆ ps2_audio_stop()

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

◆ ps2_audio_use_float()

static bool ps2_audio_use_float ( void data)
static

◆ ps2_audio_write()

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

◆ ps2_audio_write_avail()

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

Variable Documentation

◆ audio_ps2

audio_driver_t audio_ps2
Initial value:
= {
"ps2",
}
static bool ps2_audio_stop(void *data)
Definition: ps2_audio.c:222
static bool ps2_audio_use_float(void *data)
Definition: ps2_audio.c:257
static void ps2_audio_set_nonblock_state(void *data, bool toggle)
Definition: ps2_audio.c:250
static ssize_t ps2_audio_write(void *data, const void *buf, size_t size)
Definition: ps2_audio.c:188
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool ps2_audio_alive(void *data)
Definition: ps2_audio.c:211
static size_t ps2_audio_buffer_size(void *data)
Definition: ps2_audio.c:278
static size_t ps2_audio_write_avail(void *data)
Definition: ps2_audio.c:262
static void * ps2_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: ps2_audio.c:143
static bool ps2_audio_start(void *data, bool is_shutdown)
Definition: ps2_audio.c:236
static void ps2_audio_free(void *data)
Definition: ps2_audio.c:161

◆ backup_ps2

ps2_audio_t* backup_ps2
static