Lines Matching refs:SDL_NAME
36 #include "SDL_name.h"
39 #define SDL_NAME(X) X
59 static int (*SDL_NAME(snd_pcm_open))(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode);
60 static int (*SDL_NAME(snd_pcm_close))(snd_pcm_t *pcm);
61 static snd_pcm_sframes_t (*SDL_NAME(snd_pcm_writei))(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
62 static int (*SDL_NAME(snd_pcm_recover))(snd_pcm_t *pcm, int err, int silent);
63 static int (*SDL_NAME(snd_pcm_prepare))(snd_pcm_t *pcm);
64 static int (*SDL_NAME(snd_pcm_drain))(snd_pcm_t *pcm);
65 static const char *(*SDL_NAME(snd_strerror))(int errnum);
66 static size_t (*SDL_NAME(snd_pcm_hw_params_sizeof))(void);
67 static size_t (*SDL_NAME(snd_pcm_sw_params_sizeof))(void);
68 static void (*SDL_NAME(snd_pcm_hw_params_copy))(snd_pcm_hw_params_t *dst, const snd_pcm_hw_params_t *src);
69 static int (*SDL_NAME(snd_pcm_hw_params_any))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
70 static int (*SDL_NAME(snd_pcm_hw_params_set_access))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t access);
71 static int (*SDL_NAME(snd_pcm_hw_params_set_format))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
72 static int (*SDL_NAME(snd_pcm_hw_params_set_channels))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
73 static int (*SDL_NAME(snd_pcm_hw_params_get_channels))(const snd_pcm_hw_params_t *params, unsigned int *val);
74 static int (*SDL_NAME(snd_pcm_hw_params_set_rate_near))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
75 static int (*SDL_NAME(snd_pcm_hw_params_set_period_size_near))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir);
76 static int (*SDL_NAME(snd_pcm_hw_params_get_period_size))(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
77 static int (*SDL_NAME(snd_pcm_hw_params_set_periods_near))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
78 static int (*SDL_NAME(snd_pcm_hw_params_get_periods))(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
79 static int (*SDL_NAME(snd_pcm_hw_params_set_buffer_size_near))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
80 static int (*SDL_NAME(snd_pcm_hw_params_get_buffer_size))(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
81 static int (*SDL_NAME(snd_pcm_hw_params))(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
84 static int (*SDL_NAME(snd_pcm_sw_params_set_avail_min))(snd_pcm_t *pcm, snd_pcm_sw_params_t *swparams, snd_pcm_uframes_t val);
85 static int (*SDL_NAME(snd_pcm_sw_params_current))(snd_pcm_t *pcm, snd_pcm_sw_params_t *swparams);
86 static int (*SDL_NAME(snd_pcm_sw_params_set_start_threshold))(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
87 static int (*SDL_NAME(snd_pcm_sw_params))(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
88 static int (*SDL_NAME(snd_pcm_nonblock))(snd_pcm_t *pcm, int nonblock);
89 static int (*SDL_NAME(snd_pcm_wait))(snd_pcm_t *pcm, int timeout);
90 #define snd_pcm_hw_params_sizeof SDL_NAME(snd_pcm_hw_params_sizeof)
91 #define snd_pcm_sw_params_sizeof SDL_NAME(snd_pcm_sw_params_sizeof)
98 { "snd_pcm_open", (void**)(char*)&SDL_NAME(snd_pcm_open) },
99 { "snd_pcm_close", (void**)(char*)&SDL_NAME(snd_pcm_close) },
100 { "snd_pcm_writei", (void**)(char*)&SDL_NAME(snd_pcm_writei) },
101 { "snd_pcm_recover", (void**)(char*)&SDL_NAME(snd_pcm_recover) },
102 { "snd_pcm_prepare", (void**)(char*)&SDL_NAME(snd_pcm_prepare) },
103 { "snd_pcm_drain", (void**)(char*)&SDL_NAME(snd_pcm_drain) },
104 { "snd_strerror", (void**)(char*)&SDL_NAME(snd_strerror) },
105 { "snd_pcm_hw_params_sizeof", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_sizeof) },
106 { "snd_pcm_sw_params_sizeof", (void**)(char*)&SDL_NAME(snd_pcm_sw_params_sizeof) },
107 { "snd_pcm_hw_params_copy", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_copy) },
108 { "snd_pcm_hw_params_any", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_any) },
109 { "snd_pcm_hw_params_set_access", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_access) },
110 { "snd_pcm_hw_params_set_format", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_format) },
111 { "snd_pcm_hw_params_set_channels", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_channels) },
112 { "snd_pcm_hw_params_get_channels", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_get_channels) },
113 { "snd_pcm_hw_params_set_rate_near", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_rate_near) },
114 { "snd_pcm_hw_params_set_period_size_near", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_period_size_near) },
115 { "snd_pcm_hw_params_get_period_size", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_get_period_size) },
116 { "snd_pcm_hw_params_set_periods_near", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_periods_near) },
117 { "snd_pcm_hw_params_get_periods", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_get_periods) },
118 { "snd_pcm_hw_params_set_buffer_size_near", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_set_buffer_size_near) },
119 { "snd_pcm_hw_params_get_buffer_size", (void**)(char*)&SDL_NAME(snd_pcm_hw_params_get_buffer_size) },
120 { "snd_pcm_hw_params", (void**)(char*)&SDL_NAME(snd_pcm_hw_params) },
121 { "snd_pcm_sw_params_set_avail_min", (void**)(char*)&SDL_NAME(snd_pcm_sw_params_set_avail_min) },
122 { "snd_pcm_sw_params_current", (void**)(char*)&SDL_NAME(snd_pcm_sw_params_current) },
123 { "snd_pcm_sw_params_set_start_threshold", (void**)(char*)&SDL_NAME(snd_pcm_sw_params_set_start_threshold) },
124 { "snd_pcm_sw_params", (void**)(char*)&SDL_NAME(snd_pcm_sw_params) },
125 { "snd_pcm_nonblock", (void**)(char*)&SDL_NAME(snd_pcm_nonblock) },
126 { "snd_pcm_wait", (void**)(char*)&SDL_NAME(snd_pcm_wait) },
201 status = SDL_NAME(snd_pcm_open)(&handle, get_audio_device(2), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
204 SDL_NAME(snd_pcm_close)(handle);
319 /*SDL_NAME(snd_pcm_wait)(pcm_handle, -1);*/
321 status = SDL_NAME(snd_pcm_writei)(pcm_handle, sample_buf, frames_left);
328 status = SDL_NAME(snd_pcm_recover)(pcm_handle, status, 0);
331 fprintf(stderr, "ALSA write failed (unrecoverable): %s\n", SDL_NAME(snd_strerror)(status));
354 SDL_NAME(snd_pcm_drain)(pcm_handle);
355 SDL_NAME(snd_pcm_close)(pcm_handle);
366 status = SDL_NAME(snd_pcm_hw_params)(pcm_handle, hwparams);
372 status = SDL_NAME(snd_pcm_hw_params_get_buffer_size)(hwparams, &bufsize);
388 SDL_NAME(snd_pcm_hw_params_get_period_size)(hwparams, &persize, NULL);
389 SDL_NAME(snd_pcm_hw_params_get_periods)(hwparams, &periods, NULL);
406 SDL_NAME(snd_pcm_hw_params_copy)(hwparams, params);
419 status = SDL_NAME(snd_pcm_hw_params_set_period_size_near)(pcm_handle, hwparams, &frames, NULL);
425 status = SDL_NAME(snd_pcm_hw_params_set_periods_near)(pcm_handle, hwparams, &periods, NULL);
442 SDL_NAME(snd_pcm_hw_params_copy)(hwparams, params);
455 status = SDL_NAME(snd_pcm_hw_params_set_buffer_size_near)(pcm_handle, hwparams, &frames);
475 status = SDL_NAME(snd_pcm_open)(&pcm_handle, get_audio_device(spec->channels), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
478 SDL_SetError("Couldn't open audio device: %s", SDL_NAME(snd_strerror)(status));
484 status = SDL_NAME(snd_pcm_hw_params_any)(pcm_handle, hwparams);
486 SDL_NAME(snd_strerror)(status));
492 status = SDL_NAME(snd_pcm_hw_params_set_access)(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
494 SDL_SetError("Couldn't set interleaved access: %s", SDL_NAME(snd_strerror)(status));
527 status = SDL_NAME(snd_pcm_hw_params_set_format)(pcm_handle, hwparams, format);
541 status = SDL_NAME(snd_pcm_hw_params_set_channels)(pcm_handle, hwparams, spec->channels);
544 status = SDL_NAME(snd_pcm_hw_params_get_channels)(hwparams, &channels);
556 status = SDL_NAME(snd_pcm_hw_params_set_rate_near)(pcm_handle, hwparams, &rate, NULL);
558 SDL_SetError("Couldn't set audio frequency: %s", SDL_NAME(snd_strerror)(status));
569 SDL_SetError("Couldn't set hardware audio parameters: %s", SDL_NAME(snd_strerror)(status));
577 status = SDL_NAME(snd_pcm_sw_params_current)(pcm_handle, swparams);
579 SDL_SetError("Couldn't get software config: %s", SDL_NAME(snd_strerror)(status));
583 status = SDL_NAME(snd_pcm_sw_params_set_avail_min)(pcm_handle, swparams, spec->samples);
585 SDL_SetError("Couldn't set minimum available samples: %s", SDL_NAME(snd_strerror)(status));
589 status = SDL_NAME(snd_pcm_sw_params_set_start_threshold)(pcm_handle, swparams, 1);
591 SDL_SetError("Couldn't set start threshold: %s", SDL_NAME(snd_strerror)(status));
595 status = SDL_NAME(snd_pcm_sw_params)(pcm_handle, swparams);
597 SDL_SetError("Couldn't set software audio parameters: %s", SDL_NAME(snd_strerror)(status));
615 SDL_NAME(snd_pcm_nonblock)(pcm_handle, 0);