Go to the documentation of this file.
17 #include <emscripten/emscripten.h>
58 emscripten_cancel_main_loop();
88 for (
i = 0;
i < devcount;
i++) {
90 SDL_Log(
"playing on device #%d: ('%s')...",
i, devname);
96 if (
cbd[0].dev == 0) {
100 #ifdef __EMSCRIPTEN__
101 emscripten_set_main_loop(
loop, 0, 1);
119 SDL_Log(
"playing on all devices...\n");
120 for (
i = 0;
i < devcount;
i++) {
124 if (
cbd[
i].dev == 0) {
129 for (
i = 0;
i < devcount;
i++) {
137 for (
i = 0;
i < devcount;
i++) {
150 #ifndef __EMSCRIPTEN__
151 for (
i = 0;
i < devcount;
i++) {
183 if (argv[1] ==
NULL) {
184 argv[1] =
"sample.wav";
#define SDL_CloseAudioDevice
#define SDL_PauseAudioDevice
#define SDL_GetNumAudioDevices
#define SDL_WINDOWPOS_CENTERED
@ SDL_LOG_CATEGORY_APPLICATION
#define SDL_OpenAudioDevice
SDL_AudioCallback callback
static SDL_AudioSpec spec
void play_through_once(void *arg, Uint8 *stream, int len)
#define SDL_GetAudioDeviceName
#define SDL_LoadWAV(file, spec, audio_buf, audio_len)
#define SDL_GetCurrentAudioDriver
static void test_multi_audio(int devcount)
#define SDL_LogSetPriority
A type representing an atomic integer value. It is a struct so people don't accidentally use numeric ...
int main(int argc, char **argv)
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)