RetroArch
Classes | Macros | Functions | Variables
ctr_csnd_audio.c File Reference
#include <3ds.h>
#include <string.h>
#include <malloc.h>
#include <retro_miscellaneous.h>
#include <retro_timers.h>
#include "../audio_driver.h"
Include dependency graph for ctr_csnd_audio.c:

Classes

struct  ctr_csnd_audio_t
 

Macros

#define CTR_CSND_AUDIO_COUNT   (1u << 11u)
 
#define CTR_CSND_AUDIO_COUNT_MASK   (CTR_CSND_AUDIO_COUNT - 1u)
 
#define CTR_CSND_AUDIO_SIZE   (CTR_CSND_AUDIO_COUNT * sizeof(int16_t))
 
#define CTR_CSND_AUDIO_SIZE_MASK   (CTR_CSND_AUDIO_SIZE - 1u)
 
#define CTR_CSND_AUDIO_RATE   32730
 
#define CTR_CSND_TICKS_PER_SAMPLE   2048
 
#define CTR_CSND_CPU_TICKS_PER_SAMPLE   (CTR_CSND_TICKS_PER_SAMPLE * 4)
 

Functions

static void ctr_csnd_audio_update_playpos (ctr_csnd_audio_t *ctr)
 
Result csndPlaySound_custom (int chn, u32 flags, float vol, float pan, void *data0, void *data1, u32 size)
 
static voidctr_csnd_audio_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static void ctr_csnd_audio_free (void *data)
 
static ssize_t ctr_csnd_audio_write (void *data, const void *buf, size_t size)
 
static bool ctr_csnd_audio_stop (void *data)
 
static bool ctr_csnd_audio_alive (void *data)
 
static bool ctr_csnd_audio_start (void *data, bool is_shutdown)
 
static void ctr_csnd_audio_set_nonblock_state (void *data, bool state)
 
static bool ctr_csnd_audio_use_float (void *data)
 
static size_t ctr_csnd_audio_write_avail (void *data)
 
static size_t ctr_csnd_audio_buffer_size (void *data)
 

Variables

audio_driver_t audio_ctr_csnd
 

Macro Definition Documentation

◆ CTR_CSND_AUDIO_COUNT

#define CTR_CSND_AUDIO_COUNT   (1u << 11u)

◆ CTR_CSND_AUDIO_COUNT_MASK

#define CTR_CSND_AUDIO_COUNT_MASK   (CTR_CSND_AUDIO_COUNT - 1u)

◆ CTR_CSND_AUDIO_RATE

#define CTR_CSND_AUDIO_RATE   32730

◆ CTR_CSND_AUDIO_SIZE

#define CTR_CSND_AUDIO_SIZE   (CTR_CSND_AUDIO_COUNT * sizeof(int16_t))

◆ CTR_CSND_AUDIO_SIZE_MASK

#define CTR_CSND_AUDIO_SIZE_MASK   (CTR_CSND_AUDIO_SIZE - 1u)

◆ CTR_CSND_CPU_TICKS_PER_SAMPLE

#define CTR_CSND_CPU_TICKS_PER_SAMPLE   (CTR_CSND_TICKS_PER_SAMPLE * 4)

◆ CTR_CSND_TICKS_PER_SAMPLE

#define CTR_CSND_TICKS_PER_SAMPLE   2048

Function Documentation

◆ csndPlaySound_custom()

Result csndPlaySound_custom ( int  chn,
u32  flags,
float  vol,
float  pan,
void data0,
void data1,
u32  size 
)
Here is the caller graph for this function:

◆ ctr_csnd_audio_alive()

static bool ctr_csnd_audio_alive ( void data)
static

◆ ctr_csnd_audio_buffer_size()

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

◆ ctr_csnd_audio_free()

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

◆ ctr_csnd_audio_init()

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

◆ ctr_csnd_audio_set_nonblock_state()

static void ctr_csnd_audio_set_nonblock_state ( void data,
bool  state 
)
static

◆ ctr_csnd_audio_start()

static bool ctr_csnd_audio_start ( void data,
bool  is_shutdown 
)
static

◆ ctr_csnd_audio_stop()

static bool ctr_csnd_audio_stop ( void data)
static

◆ ctr_csnd_audio_update_playpos()

static void ctr_csnd_audio_update_playpos ( ctr_csnd_audio_t ctr)
static
Here is the caller graph for this function:

◆ ctr_csnd_audio_use_float()

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

◆ ctr_csnd_audio_write()

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

◆ ctr_csnd_audio_write_avail()

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

Variable Documentation

◆ audio_ctr_csnd

audio_driver_t audio_ctr_csnd
Initial value:
= {
"csnd",
}
static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size)
Definition: ctr_csnd_audio.c:165
static void * ctr_csnd_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: ctr_csnd_audio.c:106
static bool ctr_csnd_audio_alive(void *data)
Definition: ctr_csnd_audio.c:235
static bool ctr_csnd_audio_start(void *data, bool is_shutdown)
Definition: ctr_csnd_audio.c:241
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static size_t ctr_csnd_audio_buffer_size(void *data)
Definition: ctr_csnd_audio.c:286
static void ctr_csnd_audio_free(void *data)
Definition: ctr_csnd_audio.c:148
static size_t ctr_csnd_audio_write_avail(void *data)
Definition: ctr_csnd_audio.c:278
static void ctr_csnd_audio_set_nonblock_state(void *data, bool state)
Definition: ctr_csnd_audio.c:265
static bool ctr_csnd_audio_use_float(void *data)
Definition: ctr_csnd_audio.c:272
static bool ctr_csnd_audio_stop(void *data)
Definition: ctr_csnd_audio.c:211