Go to the documentation of this file.
15 #include "SDL_config.h"
25 #include <emscripten/emscripten.h>
53 waveptr =
sound + pos;
57 while (waveleft <=
len) {
80 return iscapture ?
"capture" :
"output";
95 int index =
e.adevice.which;
96 int iscapture =
e.adevice.iscapture;
113 SDL_Log(
"Opened '%s' as %u\n",
name, (
unsigned int) dev);
119 SDL_Log(
"%s device %u removed.\n",
devtypestr(
e.adevice.iscapture), (
unsigned int) dev);
125 #ifdef __EMSCRIPTEN__
130 emscripten_cancel_main_loop();
168 signal(SIGHUP,
poked);
170 signal(SIGINT,
poked);
172 signal(SIGQUIT,
poked);
174 signal(SIGTERM,
poked);
178 SDL_Log(
"Available audio drivers:");
183 SDL_Log(
"Select a driver with the SDL_AUDIODRIVER environment variable.\n");
186 #ifdef __EMSCRIPTEN__
187 emscripten_set_main_loop(
loop, 0, 1);
#define SDL_CloseAudioDevice
#define SDL_PauseAudioDevice
#define SDL_OpenAudioDevice
SDL_AudioCallback callback
#define SDL_QuitSubSystem
#define SDL_WINDOWPOS_UNDEFINED
void fillerup(void *_pos, Uint8 *stream, int len)
#define SDL_MinimizeWindow
#define SDL_GetAudioDeviceName
static const char * devtypestr(int iscapture)
@ SDL_LOG_CATEGORY_APPLICATION
GLuint const GLchar * name
#define SDL_LoadWAV(file, spec, audio_buf, audio_len)
#define SDL_GetAudioDriver
#define SDL_GetCurrentAudioDriver
static SDL_AudioSpec spec
int main(int argc, char *argv[])
#define SDL_LogSetPriority
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 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 Uint32 * e
static Uint32 positions[64]
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)
#define SDL_GetNumAudioDrivers