ludic/runtime/native/audio_win.ll
Orkuncakilkaya 00d25dcc3e feat(windows): a window - win32.ll, WGL on it, and a windowed Windows build
win32.ll implements cocoa.ll's contracts over user32 and xinput: the message
pump, the held-key set and frame key in Ludic codes, the mouse with raw input
for cursor mode 2, clip-based cursor modes released on focus loss, XInput pads,
and the software framebuffer present. win32_gl.ll puts the WGL 4.1 core context
on that window (vsync, borderless full screen); gl_win.ll's context code is now
lgl_wgl_core, shared with the headless hidden window, whose win_gl_* stubs move
to gl_win_nowin.ll. audio_win.ll links Audio.* silently for now.

Verified: macOS fixpoint, ludic-dev test 135/135, selfhost-test 32/32; on the
PC gl_triangle renders identically headless and in a real window, and Maroon
Lake builds windowed and runs a playtest to frame 240 in the desktop session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 02:33:53 +03:00

36 lines
910 B
LLVM

; ============================================================================
; audio_win.ll — the Windows sound backend (audio.ll's snd_* contract).
;
; Silent for now: every clip fails to load and every call is a no-op, which is the
; contract a headless build already runs on, so a windowed game links and plays
; without sound until the XAudio2 backend replaces this file.
; ============================================================================
define ptr @snd_load(ptr %path) {
entry:
ret ptr null
}
define void @snd_play(ptr %p, i32 %loops, i32 %rate, i32 %vol) {
entry:
ret void
}
define void @snd_stop(ptr %p) {
entry:
ret void
}
define i32 @snd_playing(ptr %p) {
entry:
ret i32 0
}
define void @snd_set_volume(ptr %p, i32 %vol) {
entry:
ret void
}
define void @snd_set_rate(ptr %p, i32 %rate) {
entry:
ret void
}
define void @snd_set_pan(ptr %p, i32 %pan) {
entry:
ret void
}