Files
RetroArch/tools/platform_stubs/emscripten/emscripten.h
LibretroAdmin 3130d7d3d6 platform_stubs: emscripten headers for the audio worklet driver
audio/drivers/audioworklet.c compiles only under emscripten, whose
headers refuse to be included from its source tree - they want a
generated sysroot - so nothing here has held that driver to a syntax
gate. Stand-ins for <emscripten/webaudio.h>, <emscripten/wasm_worker.h>
and <emscripten/atomic.h>, and the EM_ASM_* macros beside the
emscripten.h stub that was already here:

  gcc -fsyntax-only -std=gnu99 -Wall audio/drivers/audioworklet.c \
      -isystem tools/platform_stubs/emscripten \
      -Ilibretro-common/include -I. -D__EMSCRIPTEN__ -DRARCH_INTERNAL

The webaudio stub includes emscripten.h as emscripten's own does, so
the driver reaches the EM_ASM_* macros the way it does in a real
build. Struct shapes follow emscripten's, because the driver
initialises the options positionally and indexes the sample frames.
2026-09-20 20:42:04 +02:00

20 lines
745 B
C

/* Hermetic compile-only stand-in: only the names libretro-common uses. */
#ifndef STUB_emscripten_emscripten_h
#define STUB_emscripten_emscripten_h
double emscripten_get_now(void);
/* EM_ASM_* take a braced block of JavaScript, which the preprocessor
* sees as several arguments; the variadic swallows it. The value is
* never the point on this path - the gate is the C around it. */
#define EM_ASM(...) ((void)0)
#define EM_ASM_INT(...) 0
#define EM_ASM_DOUBLE(...) 0.0
#define EM_ASM_PTR(...) 0
#define MAIN_THREAD_EM_ASM(...) ((void)0)
#define MAIN_THREAD_EM_ASM_INT(...) 0
#define MAIN_THREAD_EM_ASM_DOUBLE(...) 0.0
#define MAIN_THREAD_EM_ASM_PTR(...) 0
#define MAIN_THREAD_ASYNC_EM_ASM(...) ((void)0)
#endif