21 #include "../../SDL_internal.h"
23 #if SDL_AUDIO_DRIVER_ALSA
25 #ifndef SDL_ALSA_NON_BLOCKING
26 #define SDL_ALSA_NON_BLOCKING 0
31 #include <sys/types.h>
37 #include "../SDL_audio_c.h"
40 #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
44 static int (*ALSA_snd_pcm_open)
45 (snd_pcm_t **,
const char *, snd_pcm_stream_t,
int);
46 static int (*ALSA_snd_pcm_close) (snd_pcm_t * pcm);
47 static snd_pcm_sframes_t (*ALSA_snd_pcm_writei)
48 (snd_pcm_t *,
const void *, snd_pcm_uframes_t);
49 static snd_pcm_sframes_t (*ALSA_snd_pcm_readi)
50 (snd_pcm_t *,
void *, snd_pcm_uframes_t);
51 static int (*ALSA_snd_pcm_recover) (snd_pcm_t *,
int,
int);
52 static int (*ALSA_snd_pcm_prepare) (snd_pcm_t *);
53 static int (*ALSA_snd_pcm_drain) (snd_pcm_t *);
54 static const char *(*ALSA_snd_strerror) (
int);
55 static size_t(*ALSA_snd_pcm_hw_params_sizeof) (
void);
56 static size_t(*ALSA_snd_pcm_sw_params_sizeof) (
void);
57 static void (*ALSA_snd_pcm_hw_params_copy)
58 (snd_pcm_hw_params_t *,
const snd_pcm_hw_params_t *);
59 static int (*ALSA_snd_pcm_hw_params_any) (snd_pcm_t *, snd_pcm_hw_params_t *);
60 static int (*ALSA_snd_pcm_hw_params_set_access)
61 (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_access_t);
62 static int (*ALSA_snd_pcm_hw_params_set_format)
63 (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_format_t);
64 static int (*ALSA_snd_pcm_hw_params_set_channels)
65 (snd_pcm_t *, snd_pcm_hw_params_t *,
unsigned int);
66 static int (*ALSA_snd_pcm_hw_params_get_channels)
67 (
const snd_pcm_hw_params_t *,
unsigned int *);
68 static int (*ALSA_snd_pcm_hw_params_set_rate_near)
69 (snd_pcm_t *, snd_pcm_hw_params_t *,
unsigned int *,
int *);
70 static int (*ALSA_snd_pcm_hw_params_set_period_size_near)
71 (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_uframes_t *,
int *);
72 static int (*ALSA_snd_pcm_hw_params_get_period_size)
73 (
const snd_pcm_hw_params_t *, snd_pcm_uframes_t *,
int *);
74 static int (*ALSA_snd_pcm_hw_params_set_periods_min)
75 (snd_pcm_t *, snd_pcm_hw_params_t *,
unsigned int *,
int *);
76 static int (*ALSA_snd_pcm_hw_params_set_periods_first)
77 (snd_pcm_t *, snd_pcm_hw_params_t *,
unsigned int *,
int *);
78 static int (*ALSA_snd_pcm_hw_params_get_periods)
79 (
const snd_pcm_hw_params_t *,
unsigned int *,
int *);
80 static int (*ALSA_snd_pcm_hw_params_set_buffer_size_near)
81 (snd_pcm_t *pcm, snd_pcm_hw_params_t *, snd_pcm_uframes_t *);
82 static int (*ALSA_snd_pcm_hw_params_get_buffer_size)
83 (
const snd_pcm_hw_params_t *, snd_pcm_uframes_t *);
84 static int (*ALSA_snd_pcm_hw_params) (snd_pcm_t *, snd_pcm_hw_params_t *);
85 static int (*ALSA_snd_pcm_sw_params_current) (snd_pcm_t *,
86 snd_pcm_sw_params_t *);
87 static int (*ALSA_snd_pcm_sw_params_set_start_threshold)
88 (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
89 static int (*ALSA_snd_pcm_sw_params) (snd_pcm_t *, snd_pcm_sw_params_t *);
90 static int (*ALSA_snd_pcm_nonblock) (snd_pcm_t *,
int);
91 static int (*ALSA_snd_pcm_wait)(snd_pcm_t *,
int);
92 static int (*ALSA_snd_pcm_sw_params_set_avail_min)
93 (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
94 static int (*ALSA_snd_pcm_reset)(snd_pcm_t *);
95 static int (*ALSA_snd_device_name_hint) (
int,
const char *,
void ***);
96 static char* (*ALSA_snd_device_name_get_hint) (
const void *,
const char *);
97 static int (*ALSA_snd_device_name_free_hint) (
void **);
98 static snd_pcm_sframes_t (*ALSA_snd_pcm_avail)(snd_pcm_t *);
99 #ifdef SND_CHMAP_API_VERSION
100 static snd_pcm_chmap_t* (*ALSA_snd_pcm_get_chmap) (snd_pcm_t *);
101 static int (*ALSA_snd_pcm_chmap_print) (
const snd_pcm_chmap_t *
map,
size_t maxlen,
char *
buf);
104 #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
105 #define snd_pcm_hw_params_sizeof ALSA_snd_pcm_hw_params_sizeof
106 #define snd_pcm_sw_params_sizeof ALSA_snd_pcm_sw_params_sizeof
108 static const char *alsa_library = SDL_AUDIO_DRIVER_ALSA_DYNAMIC;
109 static void *alsa_handle =
NULL;
112 load_alsa_sym(
const char *fn,
void **
addr)
124 #define SDL_ALSA_SYM(x) \
125 if (!load_alsa_sym(#x, (void **) (char *) &ALSA_##x)) return -1
127 #define SDL_ALSA_SYM(x) ALSA_##x = x
133 SDL_ALSA_SYM(snd_pcm_open);
134 SDL_ALSA_SYM(snd_pcm_close);
135 SDL_ALSA_SYM(snd_pcm_writei);
136 SDL_ALSA_SYM(snd_pcm_readi);
137 SDL_ALSA_SYM(snd_pcm_recover);
138 SDL_ALSA_SYM(snd_pcm_prepare);
139 SDL_ALSA_SYM(snd_pcm_drain);
140 SDL_ALSA_SYM(snd_strerror);
141 SDL_ALSA_SYM(snd_pcm_hw_params_sizeof);
142 SDL_ALSA_SYM(snd_pcm_sw_params_sizeof);
143 SDL_ALSA_SYM(snd_pcm_hw_params_copy);
144 SDL_ALSA_SYM(snd_pcm_hw_params_any);
145 SDL_ALSA_SYM(snd_pcm_hw_params_set_access);
146 SDL_ALSA_SYM(snd_pcm_hw_params_set_format);
147 SDL_ALSA_SYM(snd_pcm_hw_params_set_channels);
148 SDL_ALSA_SYM(snd_pcm_hw_params_get_channels);
149 SDL_ALSA_SYM(snd_pcm_hw_params_set_rate_near);
150 SDL_ALSA_SYM(snd_pcm_hw_params_set_period_size_near);
151 SDL_ALSA_SYM(snd_pcm_hw_params_get_period_size);
152 SDL_ALSA_SYM(snd_pcm_hw_params_set_periods_min);
153 SDL_ALSA_SYM(snd_pcm_hw_params_set_periods_first);
154 SDL_ALSA_SYM(snd_pcm_hw_params_get_periods);
155 SDL_ALSA_SYM(snd_pcm_hw_params_set_buffer_size_near);
156 SDL_ALSA_SYM(snd_pcm_hw_params_get_buffer_size);
157 SDL_ALSA_SYM(snd_pcm_hw_params);
158 SDL_ALSA_SYM(snd_pcm_sw_params_current);
159 SDL_ALSA_SYM(snd_pcm_sw_params_set_start_threshold);
160 SDL_ALSA_SYM(snd_pcm_sw_params);
161 SDL_ALSA_SYM(snd_pcm_nonblock);
162 SDL_ALSA_SYM(snd_pcm_wait);
163 SDL_ALSA_SYM(snd_pcm_sw_params_set_avail_min);
164 SDL_ALSA_SYM(snd_pcm_reset);
165 SDL_ALSA_SYM(snd_device_name_hint);
166 SDL_ALSA_SYM(snd_device_name_get_hint);
167 SDL_ALSA_SYM(snd_device_name_free_hint);
168 SDL_ALSA_SYM(snd_pcm_avail);
169 #ifdef SND_CHMAP_API_VERSION
170 SDL_ALSA_SYM(snd_pcm_get_chmap);
171 SDL_ALSA_SYM(snd_pcm_chmap_print);
179 #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
182 UnloadALSALibrary(
void)
184 if (alsa_handle !=
NULL) {
191 LoadALSALibrary(
void)
194 if (alsa_handle ==
NULL) {
196 if (alsa_handle ==
NULL) {
200 retval = load_alsa_syms();
212 UnloadALSALibrary(
void)
217 LoadALSALibrary(
void)
231 return (
const char *)
handle;
241 return "plug:surround51";
242 }
else if (channels == 4) {
243 return "plug:surround40";
252 ALSA_WaitDevice(
_THIS)
254 #if SDL_ALSA_NON_BLOCKING
255 const snd_pcm_sframes_t needed = (snd_pcm_sframes_t) this->
spec.
samples;
257 const snd_pcm_sframes_t rc = ALSA_snd_pcm_avail(this->hidden->pcm_handle);
258 if ((rc < 0) && (rc != -EAGAIN)) {
260 fprintf(stderr,
"ALSA snd_pcm_avail failed (unrecoverable): %s\n",
261 ALSA_snd_strerror(rc));
264 }
else if (rc < needed) {
281 #define SWIZ6(T, buf, numframes) \
282 T *ptr = (T *) buf; \
284 for (i = 0; i < numframes; i++, ptr += 6) { \
286 tmp = ptr[2]; ptr[2] = ptr[4]; ptr[4] = tmp; \
287 tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
291 swizzle_alsa_channels_6_64bit(
void *
buffer,
Uint32 bufferlen)
297 swizzle_alsa_channels_6_32bit(
void *
buffer,
Uint32 bufferlen)
303 swizzle_alsa_channels_6_16bit(
void *
buffer,
Uint32 bufferlen)
309 swizzle_alsa_channels_6_8bit(
void *
buffer,
Uint32 bufferlen)
326 case 8: swizzle_alsa_channels_6_8bit(
buffer, bufferlen);
break;
327 case 16: swizzle_alsa_channels_6_16bit(
buffer, bufferlen);
break;
328 case 32: swizzle_alsa_channels_6_32bit(
buffer, bufferlen);
break;
329 case 64: swizzle_alsa_channels_6_64bit(
buffer, bufferlen);
break;
330 default:
SDL_assert(!
"unhandled bitsize");
break;
337 #ifdef SND_CHMAP_API_VERSION
347 ALSA_PlayDevice(
_THIS)
349 const Uint8 *sample_buf = (
const Uint8 *) this->hidden->mixbuf;
352 snd_pcm_uframes_t frames_left = ((snd_pcm_uframes_t) this->
spec.
samples);
354 this->hidden->swizzle_func(
this, this->hidden->mixbuf, frames_left);
357 int status = ALSA_snd_pcm_writei(this->hidden->pcm_handle,
358 sample_buf, frames_left);
361 if (status == -EAGAIN) {
367 status = ALSA_snd_pcm_recover(this->hidden->pcm_handle, status, 0);
370 fprintf(stderr,
"ALSA write failed (unrecoverable): %s\n",
371 ALSA_snd_strerror(status));
377 else if (status == 0) {
384 sample_buf += status * frame_size;
385 frames_left -= status;
390 ALSA_GetDeviceBuf(
_THIS)
392 return (this->hidden->mixbuf);
396 ALSA_CaptureFromDevice(
_THIS,
void *
buffer,
int buflen)
401 const int total_frames = buflen / frame_size;
402 snd_pcm_uframes_t frames_left = total_frames;
403 snd_pcm_uframes_t wait_time = frame_size / 2;
410 status = ALSA_snd_pcm_readi(this->hidden->pcm_handle,
411 sample_buf, frames_left);
413 if (status == -EAGAIN) {
414 ALSA_snd_pcm_wait(this->hidden->pcm_handle, wait_time);
417 else if (status < 0) {
419 status = ALSA_snd_pcm_recover(this->hidden->pcm_handle, status, 0);
422 fprintf(stderr,
"ALSA read failed (unrecoverable): %s\n",
423 ALSA_snd_strerror(status));
430 sample_buf += status * frame_size;
431 frames_left -= status;
434 this->hidden->swizzle_func(
this,
buffer, total_frames - frames_left);
436 return (total_frames - frames_left) * frame_size;
440 ALSA_FlushCapture(
_THIS)
442 ALSA_snd_pcm_reset(this->hidden->pcm_handle);
446 ALSA_CloseDevice(
_THIS)
448 if (this->hidden->pcm_handle) {
455 ALSA_snd_pcm_close(this->hidden->pcm_handle);
462 ALSA_set_buffer_size(
_THIS, snd_pcm_hw_params_t *
params)
465 snd_pcm_hw_params_t *hwparams;
466 snd_pcm_uframes_t persize;
467 unsigned int periods;
470 snd_pcm_hw_params_alloca(&hwparams);
471 ALSA_snd_pcm_hw_params_copy(hwparams,
params);
475 status = ALSA_snd_pcm_hw_params_set_period_size_near(
476 this->hidden->pcm_handle, hwparams, &persize,
NULL);
483 status = ALSA_snd_pcm_hw_params_set_periods_min(
484 this->hidden->pcm_handle, hwparams, &periods,
NULL);
489 status = ALSA_snd_pcm_hw_params_set_periods_first(
490 this->hidden->pcm_handle, hwparams, &periods,
NULL);
496 status = ALSA_snd_pcm_hw_params(this->hidden->pcm_handle, hwparams);
507 ALSA_snd_pcm_hw_params_get_buffer_size(hwparams, &
bufsize);
510 "ALSA: period size = %ld, periods = %u, buffer size = %lu\n",
518 ALSA_OpenDevice(
_THIS,
void *
handle,
const char *devname,
int iscapture)
521 snd_pcm_t *pcm_handle =
NULL;
522 snd_pcm_hw_params_t *hwparams =
NULL;
523 snd_pcm_sw_params_t *swparams =
NULL;
524 snd_pcm_format_t
format = 0;
526 unsigned int rate = 0;
527 unsigned int channels = 0;
528 #ifdef SND_CHMAP_API_VERSION
529 snd_pcm_chmap_t *chmap;
536 if (this->hidden ==
NULL) {
545 iscapture ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK,
549 return SDL_SetError(
"ALSA: Couldn't open audio device: %s",
550 ALSA_snd_strerror(status));
556 snd_pcm_hw_params_alloca(&hwparams);
557 status = ALSA_snd_pcm_hw_params_any(
pcm_handle, hwparams);
559 return SDL_SetError(
"ALSA: Couldn't get hardware config: %s",
560 ALSA_snd_strerror(status));
564 status = ALSA_snd_pcm_hw_params_set_access(
pcm_handle, hwparams,
565 SND_PCM_ACCESS_RW_INTERLEAVED);
567 return SDL_SetError(
"ALSA: Couldn't set interleaved access: %s",
568 ALSA_snd_strerror(status));
574 test_format && (status < 0);) {
576 switch (test_format) {
578 format = SND_PCM_FORMAT_U8;
581 format = SND_PCM_FORMAT_S8;
584 format = SND_PCM_FORMAT_S16_LE;
587 format = SND_PCM_FORMAT_S16_BE;
590 format = SND_PCM_FORMAT_U16_LE;
593 format = SND_PCM_FORMAT_U16_BE;
596 format = SND_PCM_FORMAT_S32_LE;
599 format = SND_PCM_FORMAT_S32_BE;
602 format = SND_PCM_FORMAT_FLOAT_LE;
605 format = SND_PCM_FORMAT_FLOAT_BE;
612 status = ALSA_snd_pcm_hw_params_set_format(
pcm_handle,
620 return SDL_SetError(
"ALSA: Couldn't find any hardware audio formats");
627 this->hidden->swizzle_func = swizzle_alsa_channels;
628 #ifdef SND_CHMAP_API_VERSION
631 ALSA_snd_pcm_chmap_print(chmap,
sizeof(chmap_str), chmap_str);
632 if (
SDL_strcmp(
"FL FR FC LFE RL RR", chmap_str) == 0 ||
633 SDL_strcmp(
"FL FR FC LFE SL SR", chmap_str) == 0) {
634 this->hidden->swizzle_func = no_swizzle;
641 status = ALSA_snd_pcm_hw_params_set_channels(
pcm_handle, hwparams,
645 status = ALSA_snd_pcm_hw_params_get_channels(hwparams, &channels);
647 return SDL_SetError(
"ALSA: Couldn't set audio channels");
654 status = ALSA_snd_pcm_hw_params_set_rate_near(
pcm_handle, hwparams,
657 return SDL_SetError(
"ALSA: Couldn't set audio frequency: %s",
658 ALSA_snd_strerror(status));
663 status = ALSA_set_buffer_size(
this, hwparams);
665 return SDL_SetError(
"Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
669 snd_pcm_sw_params_alloca(&swparams);
670 status = ALSA_snd_pcm_sw_params_current(
pcm_handle, swparams);
672 return SDL_SetError(
"ALSA: Couldn't get software config: %s",
673 ALSA_snd_strerror(status));
677 return SDL_SetError(
"Couldn't set minimum available samples: %s",
678 ALSA_snd_strerror(status));
681 ALSA_snd_pcm_sw_params_set_start_threshold(
pcm_handle, swparams, 1);
683 return SDL_SetError(
"ALSA: Couldn't set start threshold: %s",
684 ALSA_snd_strerror(status));
686 status = ALSA_snd_pcm_sw_params(
pcm_handle, swparams);
688 return SDL_SetError(
"Couldn't set software audio parameters: %s",
689 ALSA_snd_strerror(status));
697 this->hidden->mixlen = this->
spec.
size;
699 if (this->hidden->mixbuf ==
NULL) {
702 SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
705 #if !SDL_ALSA_NON_BLOCKING
715 typedef struct ALSA_Device
719 struct ALSA_Device *next;
723 add_device(
const int iscapture,
const char *
name,
void *hint, ALSA_Device **pSeen)
725 ALSA_Device *dev =
SDL_malloc(
sizeof (ALSA_Device));
739 desc = ALSA_snd_device_name_get_hint(hint,
"DESC");
745 desc = (
char *)
name;
753 if ((
ptr = strchr(desc,
'\n')) !=
NULL) {
772 dev->iscapture = iscapture;
782 ALSA_HotplugThread(
void *arg)
784 SDL_sem *first_run_semaphore = (SDL_sem *) arg;
798 if (ALSA_snd_device_name_hint(-1,
"pcm", &hints) == 0) {
800 const char *match =
NULL;
801 int bestmatch = 0xFFFF;
802 size_t match_len = 0;
804 static const char *
const prefixes[] = {
805 "hw:",
"sysdefault:",
"default:",
NULL
814 for (
i = 0; hints[
i];
i++) {
815 char *
name = ALSA_snd_device_name_get_hint(hints[
i],
"NAME");
825 for (
j = 0; prefixes[
j];
j++) {
826 const char *prefix = prefixes[
j];
832 match_len = prefixlen;
841 for (
i = 0; hints[
i];
i++) {
845 if ((!match) && (defaultdev !=
i)) {
849 name = ALSA_snd_device_name_get_hint(hints[
i],
"NAME");
856 char *ioid = ALSA_snd_device_name_get_hint(hints[
i],
"IOID");
864 if (!isoutput && !isinput) {
870 for (dev = unseen; dev; dev = next) {
872 if ( (
SDL_strcmp(dev->name,
name) == 0) && (((isinput) && dev->iscapture) || ((isoutput) && !dev->iscapture)) ) {
881 if (isoutput) have_output =
SDL_TRUE;
887 if (isinput && !have_input) {
890 if (isoutput && !have_output) {
898 ALSA_snd_device_name_free_hint(hints);
903 for (dev = unseen; dev; dev = next) {
913 if (first_run_semaphore) {
915 first_run_semaphore =
NULL;
926 for (dev =
devices; dev; dev = next) {
937 ALSA_DetectDevices(
void)
947 ALSA_hotplug_thread =
SDL_CreateThread(ALSA_HotplugThread,
"SDLHotplugALSA", semaphore);
948 if (ALSA_hotplug_thread) {
956 ALSA_Deinitialize(
void)
958 if (ALSA_hotplug_thread !=
NULL) {
961 ALSA_hotplug_thread =
NULL;
970 if (LoadALSALibrary() < 0) {
992 "alsa",
"ALSA PCM audio", ALSA_Init, 0
#define SDL_assert(condition)
void SDL_RemoveAudioDevice(const int iscapture, void *handle)
void SDL_AddAudioDevice(const int iscapture, const char *name, void *handle)
void SDL_CalculateAudioSpec(SDL_AudioSpec *spec)
static SDL_AudioDevice * get_audio_device(SDL_AudioDeviceID id)
SDL_AudioFormat SDL_FirstAudioFormat(SDL_AudioFormat format)
void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device)
SDL_AudioFormat SDL_NextAudioFormat(void)
Uint16 SDL_AudioFormat
Audio format flags.
#define SDL_AUDIO_BITSIZE(x)
#define SDL_SetThreadPriority
#define SDL_DestroySemaphore
#define SDL_CreateSemaphore
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
#define SDL_OutOfMemory()
const GLubyte GLuint GLuint GLuint GLuint alpha GLboolean GLboolean GLboolean GLboolean alpha GLint GLint GLsizei GLsizei GLenum type GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint border GLenum GLint GLint GLint GLint GLint GLsizei GLsizei height GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLint j2 GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLenum GLint *params GLenum GLenum GLint *params GLenum GLenum GLint *params GLenum GLenum GLfloat *params GLenum GLint GLenum GLenum GLvoid *pixels GLenum GLint GLenum GLint *params GLenum GLenum GLint *params GLenum GLsizei const GLvoid *pointer GLenum GLenum const GLint *params GLenum GLfloat GLfloat GLint GLint const GLfloat *points GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat *points GLint GLfloat GLfloat GLint GLfloat GLfloat v2 GLenum GLenum const GLint *params GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum map
void * SDL_LoadFunction(void *handle, const char *name)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint const GLchar * name
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint GLsizei bufsize
AudioBootStrap ALSA_bootstrap
#define SDL_CreateThread(fn, name, data)
@ SDL_THREAD_PRIORITY_LOW
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
#define SDL_TICKS_PASSED(A, B)
Compare SDL ticks values, and return true if A has passed B.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
EGLImageKHR EGLint EGLint * handle
static SDL_AudioDeviceID device
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF ptr
void(* PlayDevice)(_THIS)
void(* WaitDevice)(_THIS)
void(* CloseDevice)(_THIS)
void(* FlushCapture)(_THIS)
void(* DetectDevices)(void)
Uint8 *(* GetDeviceBuf)(_THIS)
void(* Deinitialize)(void)
int(* CaptureFromDevice)(_THIS, void *buffer, int buflen)
int(* OpenDevice)(_THIS, void *handle, const char *devname, int iscapture)
A type representing an atomic integer value. It is a struct so people don't accidentally use numeric ...
typedef int(__stdcall *FARPROC)()