RetroArch
Classes | Macros | Typedefs | Functions | Variables
opensl.c File Reference
#include <SLES/OpenSLES.h>
#include <rthreads/rthreads.h>
#include "../audio_driver.h"
Include dependency graph for opensl.c:

Classes

struct  sl
 

Macros

#define SLObjectItf_Realize(a, ...)   ((*(a))->Realize(a, __VA_ARGS__))
 
#define SLObjectItf_GetInterface(a, ...)   ((*(a))->GetInterface(a, __VA_ARGS__))
 
#define SLObjectItf_Destroy(a)   ((*(a))->Destroy((a)))
 
#define SLEngineItf_CreateOutputMix(a, ...)   ((*(a))->CreateOutputMix(a, __VA_ARGS__))
 
#define SLEngineItf_CreateAudioPlayer(a, ...)   ((*(a))->CreateAudioPlayer(a, __VA_ARGS__))
 
#define SLPlayItf_SetPlayState(a, ...)   ((*(a))->SetPlayState(a, __VA_ARGS__))
 
#define GOTO_IF_FAIL(x)
 

Typedefs

typedef struct sl sl_t
 

Functions

static void opensl_callback (SLAndroidSimpleBufferQueueItf bq, void *ctx)
 
static void sl_free (void *data)
 
static voidsl_init (const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
 
static bool sl_stop (void *data)
 
static bool sl_alive (void *data)
 
static void sl_set_nonblock_state (void *data, bool state)
 
static bool sl_start (void *data, bool is_shutdown)
 
static ssize_t sl_write (void *data, const void *buf_, size_t size)
 
static size_t sl_write_avail (void *data)
 
static size_t sl_buffer_size (void *data)
 
static bool sl_use_float (void *data)
 

Variables

audio_driver_t audio_opensl
 

Macro Definition Documentation

◆ GOTO_IF_FAIL

#define GOTO_IF_FAIL (   x)
Value:
do { \
if ((res = (x)) != SL_RESULT_SUCCESS) \
goto error; \
} while(0)
GLuint res
Definition: glext.h:10520
static l_noret error(LoadState *S, const char *why)
Definition: lundump.c:39
GLint GLint GLint GLint GLint x
Definition: glext.h:6295

◆ SLEngineItf_CreateAudioPlayer

#define SLEngineItf_CreateAudioPlayer (   a,
  ... 
)    ((*(a))->CreateAudioPlayer(a, __VA_ARGS__))

◆ SLEngineItf_CreateOutputMix

#define SLEngineItf_CreateOutputMix (   a,
  ... 
)    ((*(a))->CreateOutputMix(a, __VA_ARGS__))

◆ SLObjectItf_Destroy

#define SLObjectItf_Destroy (   a)    ((*(a))->Destroy((a)))

◆ SLObjectItf_GetInterface

#define SLObjectItf_GetInterface (   a,
  ... 
)    ((*(a))->GetInterface(a, __VA_ARGS__))

◆ SLObjectItf_Realize

#define SLObjectItf_Realize (   a,
  ... 
)    ((*(a))->Realize(a, __VA_ARGS__))

◆ SLPlayItf_SetPlayState

#define SLPlayItf_SetPlayState (   a,
  ... 
)    ((*(a))->SetPlayState(a, __VA_ARGS__))

Typedef Documentation

◆ sl_t

typedef struct sl sl_t

Function Documentation

◆ opensl_callback()

static void opensl_callback ( SLAndroidSimpleBufferQueueItf  bq,
void ctx 
)
static
Here is the caller graph for this function:

◆ sl_alive()

static bool sl_alive ( void data)
static

◆ sl_buffer_size()

static size_t sl_buffer_size ( void data)
static

◆ sl_free()

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

◆ sl_init()

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

◆ sl_set_nonblock_state()

static void sl_set_nonblock_state ( void data,
bool  state 
)
static

◆ sl_start()

static bool sl_start ( void data,
bool  is_shutdown 
)
static

◆ sl_stop()

static bool sl_stop ( void data)
static

◆ sl_use_float()

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

◆ sl_write()

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

◆ sl_write_avail()

static size_t sl_write_avail ( void data)
static

Variable Documentation

◆ audio_opensl

audio_driver_t audio_opensl
Initial value:
= {
"opensl",
}
static void sl_set_nonblock_state(void *data, bool state)
Definition: opensl.c:220
static bool sl_use_float(void *data)
Definition: opensl.c:301
static bool sl_stop(void *data)
Definition: opensl.c:203
static void sl_free(void *data)
Definition: opensl.c:72
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool sl_start(void *data, bool is_shutdown)
Definition: opensl.c:227
static size_t sl_write_avail(void *data)
Definition: opensl.c:288
static bool sl_alive(void *data)
Definition: opensl.c:212
static void * sl_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate)
Definition: opensl.c:100
static ssize_t sl_write(void *data, const void *buf_, size_t size)
Definition: opensl.c:236
static size_t sl_buffer_size(void *data)
Definition: opensl.c:295