24 #include <emscripten/emscripten.h> 86 waveptr =
wave.sound +
wave.soundpos;
87 waveleft =
wave.soundlen -
wave.soundpos;
90 while (waveleft <= len) {
95 waveleft =
wave.soundlen;
104 #ifdef __EMSCRIPTEN__ 109 emscripten_cancel_main_loop();
131 SDL_strlcpy(filename,
"sample.wav",
sizeof(filename));
142 SDL_Log(
"Available audio drivers:");
153 #ifdef __EMSCRIPTEN__ 154 emscripten_set_main_loop(
loop, 0, 1);
#define SDL_GetNumAudioDrivers
#define SDL_CloseAudioDevice
#define SDL_OpenAudioDevice
int main(int argc, char *argv[])
static SDL_AudioDeviceID device
void fillerup(void *unused, Uint8 *stream, int len)
static void reopen_audio()
#define SDL_LoadWAV(file, spec, audio_buf, audio_len)
#define SDL_GetAudioDeviceStatus
#define SDL_GetAudioDriver
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_LogSetPriority
#define SDL_GetCurrentAudioDriver
SDL_AudioDeviceEvent adevice
static void close_audio()
#define SDL_PauseAudioDevice