zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opensl.c File Reference
#include "config.h"
#include <stdlib.h>
#include "alMain.h"
#include "alu.h"
#include <SLES/OpenSLES.h>
#include <SLES/OpenSLES_Android.h>

Go to the source code of this file.

Macros

#define PRINTERR(x, s)
 
#define SLEngineItf_CreateAudioPlayer(a, b, c, d, e, f, g)   ((*(a))->CreateAudioPlayer((a),(b),(c),(d),(e),(f),(g)))
 
#define SLEngineItf_CreateOutputMix(a, b, c, d, e)   ((*(a))->CreateOutputMix((a),(b),(c),(d),(e)))
 
#define SLObjectItf_Destroy(a)   ((*(a))->Destroy((a)))
 
#define SLObjectItf_GetInterface(a, b, c)   ((*(a))->GetInterface((a),(b),(c)))
 
#define SLObjectItf_Realize(a, b)   ((*(a))->Realize((a),(b)))
 
#define SLPlayItf_SetPlayState(a, b)   ((*(a))->SetPlayState((a),(b)))
 

Functions

void alc_opensl_deinit (void)
 
ALCboolean alc_opensl_init (BackendFuncs *func_list)
 
void alc_opensl_probe (enum DevProbe type)
 
static SLuint32 GetChannelMask (enum DevFmtChannels chans)
 
static void opensl_callback (SLAndroidSimpleBufferQueueItf bq, void *context)
 
static void opensl_close_playback (ALCdevice *Device)
 
static ALCenum opensl_open_playback (ALCdevice *Device, const ALCchar *deviceName)
 
static ALCboolean opensl_reset_playback (ALCdevice *Device)
 
static ALCboolean opensl_start_playback (ALCdevice *Device)
 
static void opensl_stop_playback (ALCdevice *Device)
 
static const char * res_str (SLresult result)
 

Variables

static const ALCchar opensl_device [] = "OpenSL"
 
static const BackendFuncs opensl_funcs
 

Macro Definition Documentation

#define PRINTERR (   x,
  s 
)
Value:
do { \
if((x) != SL_RESULT_SUCCESS) \
ERR("%s: %s\n", (s), res_str((x))); \
} while(0)
GLdouble s
Definition: glew.h:1376
EGLSurface EGLint x
Definition: eglext.h:293
if(!yyg->yy_init)
static const char * res_str(SLresult result)
Definition: opensl.c:134
#define ERR(...)
Definition: alMain.h:816

Definition at line 162 of file opensl.c.

Referenced by opensl_callback(), opensl_open_playback(), opensl_reset_playback(), and opensl_start_playback().

#define SLEngineItf_CreateAudioPlayer (   a,
  b,
  c,
  d,
  e,
  f,
  g 
)    ((*(a))->CreateAudioPlayer((a),(b),(c),(d),(e),(f),(g)))

Definition at line 82 of file opensl.c.

Referenced by opensl_reset_playback().

#define SLEngineItf_CreateOutputMix (   a,
  b,
  c,
  d,
  e 
)    ((*(a))->CreateOutputMix((a),(b),(c),(d),(e)))

Definition at line 81 of file opensl.c.

Referenced by opensl_open_playback().

#define SLObjectItf_Destroy (   a)    ((*(a))->Destroy((a)))
#define SLObjectItf_GetInterface (   a,
  b,
  c 
)    ((*(a))->GetInterface((a),(b),(c)))

Definition at line 78 of file opensl.c.

Referenced by opensl_open_playback(), and opensl_start_playback().

#define SLObjectItf_Realize (   a,
  b 
)    ((*(a))->Realize((a),(b)))

Definition at line 77 of file opensl.c.

Referenced by opensl_open_playback(), and opensl_reset_playback().

#define SLPlayItf_SetPlayState (   a,
  b 
)    ((*(a))->SetPlayState((a),(b)))

Definition at line 84 of file opensl.c.

Referenced by opensl_start_playback().

Function Documentation

void alc_opensl_deinit ( void  )

Definition at line 428 of file opensl.c.

ALCboolean alc_opensl_init ( BackendFuncs func_list)

Definition at line 422 of file opensl.c.

References ALC_TRUE, and opensl_funcs.

void alc_opensl_probe ( enum DevProbe  type)
static SLuint32 GetChannelMask ( enum DevFmtChannels  chans)
static

Definition at line 108 of file opensl.c.

References DevFmtMono, DevFmtQuad, DevFmtStereo, DevFmtX51, DevFmtX51Side, DevFmtX61, and DevFmtX71.

Referenced by opensl_reset_playback().

static void opensl_callback ( SLAndroidSimpleBufferQueueItf  bq,
void context 
)
static

Definition at line 168 of file opensl.c.

References aluMixData(), context, ALCdevice_struct::ExtraData, and PRINTERR.

Referenced by opensl_start_playback().

static void opensl_close_playback ( ALCdevice Device)
static

Definition at line 241 of file opensl.c.

References ALCdevice_struct::ExtraData, free, NULL, and SLObjectItf_Destroy.

static void opensl_stop_playback ( ALCdevice Device)
static

Definition at line 394 of file opensl.c.

References ALCdevice_struct::ExtraData, free, and NULL.

static const char* res_str ( SLresult  result)
static

Definition at line 134 of file opensl.c.

Variable Documentation

const ALCchar opensl_device[] = "OpenSL"
static

Definition at line 105 of file opensl.c.

Referenced by alc_opensl_probe(), and opensl_open_playback().

const BackendFuncs opensl_funcs
static
Initial value:
= {
}
#define NULL
Definition: ftobjs.h:61
static void opensl_stop_playback(ALCdevice *Device)
Definition: opensl.c:394
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
static void opensl_close_playback(ALCdevice *Device)
Definition: opensl.c:241
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
static ALCboolean opensl_reset_playback(ALCdevice *Device)
Definition: opensl.c:260
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281
static ALCenum opensl_open_playback(ALCdevice *Device, const ALCchar *deviceName)
Definition: opensl.c:181
static ALCboolean opensl_start_playback(ALCdevice *Device)
Definition: opensl.c:331

Definition at line 404 of file opensl.c.

Referenced by alc_opensl_init().