ludic/runtime/native
Orkuncakilkaya a5f6c02a09 runtime/audio (macOS): voices on one AVAudioEngine instead of an AVAudioPlayer per sound
AVFAudio keeps a 64-byte AudioQueueOwner for good on every AVAudioPlayer play
after the clip has finished - measured one a play, whatever is called around
it (prepareToPlay, pause, no rewind) and still there after the player is
released; a stop before the play made one every time. The windowed walk showed
it as AudioQueueOwner 73 -> 87 in a minute.

A sound is now decoded once into a PCM buffer and played by a voice of its own
on one shared engine: a player node (the buffer scheduled again on each play,
looping for -1), a varispeed (the rate) and a small mixer (volume and pan).
snd_playing compares the uptime clock with the end worked out when the clip was
played (asking the node where it is made two AVAudioTime objects a call), and
snd_play drains an autorelease pool of its own. The C interface is unchanged.

A harness driving snd_* directly (400 plays past the end, the playing flag
checked during and after each, a loop and a stop, the setters) holds the heap
flat to a block and gets the flag right 400 of 400; the windowed valley
compiles and links against it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 23:00:59 +03:00
..
atlas.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
audio.ll runtime/audio (macOS): voices on one AVAudioEngine instead of an AVAudioPlayer per sound 2026-09-28 23:00:59 +03:00
audio.ludic runtime/audio (macOS): voices on one AVAudioEngine instead of an AVAudioPlayer per sound 2026-09-28 23:00:59 +03:00
audio_win.ll feat(windows): sound, through XAudio2 2026-09-13 02:42:48 +03:00
base64.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
bignum.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
bytes.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00
cocoa.ll feat(render3d): Vulkan in a macOS window through MoltenVK; window built-ins take a slice's elements; the NEAR_FADE SPIR-V 2026-09-27 00:52:45 +03:00
core.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
dict.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00
fx.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
gl.ll feat(render3d): Vulkan in a macOS window through MoltenVK; window built-ins take a slice's elements; the NEAR_FADE SPIR-V 2026-09-27 00:52:45 +03:00
gl.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
gl_api.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
gl_thunks.ll feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
gl_thunks_win.ll feat(windows): Gl.* on Windows, through WGL and a driver-filled thunk table 2026-09-13 02:10:36 +03:00
gl_win.ll carry: the runtime and render3d work Maroon Lake builds against 2026-09-23 15:55:02 +03:00
gl_win_nowin.ll feat(render3d): Vulkan in a macOS window through MoltenVK; window built-ins take a slice's elements; the NEAR_FADE SPIR-V 2026-09-27 00:52:45 +03:00
grid.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
http.ll feat(launcher): Process.*, Http.save_to/received/expected, App.window_hide/show 2026-09-17 13:32:23 +03:00
http.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
http_win.ll feat(launcher): Process.*, Http.save_to/received/expected, App.window_hide/show 2026-09-17 13:32:23 +03:00
image.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
inflate.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
input.ludic runtime/input: the window's mouse, pad and touch buffers and the typed text made once 2026-09-28 22:34:57 +03:00
jobs.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
light.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
namespaces.ludic runtime: Json.write_file, and Json.encode through a kept buffer 2026-09-28 15:32:36 +03:00
numeric.ludic refactor(runtime,packages,examples): named constants, package enums, idiom sweep 2026-09-05 01:12:26 +03:00
process.ll feat(launcher): Process.*, Http.save_to/received/expected, App.window_hide/show 2026-09-17 13:32:23 +03:00
process.ludic feat(lang): L7 memory is safe unless it says unsafe 2026-09-24 12:53:27 +03:00
process_win.ll feat(launcher): Process.*, Http.save_to/received/expected, App.window_hide/show 2026-09-17 13:32:23 +03:00
query.ludic refactor(runtime,packages,examples): named constants, package enums, idiom sweep 2026-09-05 01:12:26 +03:00
reflect_io.ludic refactor(runtime,packages,examples): named constants, package enums, idiom sweep 2026-09-05 01:12:26 +03:00
regex.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
regex_vm.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
rng.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
systems.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
systems_bounds.ludic refactor(runtime,packages,examples): named constants, package enums, idiom sweep 2026-09-05 01:12:26 +03:00
systems_light.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
systems_move.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
systems_sprite.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
systems_tileskin.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
threads.ll feat(jobs): real OS threads - Job.parallel_for, fn name, thread-safe Sync 2026-09-15 13:52:22 +03:00
threads_win.ll feat(jobs): real OS threads - Job.parallel_for, fn name, thread-safe Sync 2026-09-15 13:52:22 +03:00
tiled.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
tiled_spawn.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
truetype.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
truetype_raster.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
tween.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
udp.ll feat(udp): Udp.* - polled IPv4 datagrams on macOS and Windows 2026-09-17 11:16:14 +03:00
udp.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
udp_win.ll feat(udp): Udp.* - polled IPv4 datagrams on macOS and Windows 2026-09-17 11:16:14 +03:00
ui.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
ui_draw.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
value.ludic r3d/runtime: allocs, keeps and births at 0 on this side 2026-09-28 20:10:59 +03:00
vk.ludic render3d: VkAllocationCallbacks counted (R3D_ALLOC_VK), pipeline create infos freed, actor pool at init 2026-09-28 15:46:19 +03:00
vk_api.ludic feat(vk): Vk.* - Vulkan 1.0-1.4 generated from the registry, loaded at run time 2026-09-15 09:52:12 +03:00
vk_mac.ll render3d: VkAllocationCallbacks counted (R3D_ALLOC_VK), pipeline create infos freed, actor pool at init 2026-09-28 15:46:19 +03:00
vk_thunks.ll feat(vk): Vk.* - Vulkan 1.0-1.4 generated from the registry, loaded at run time 2026-09-15 09:52:12 +03:00
vk_win.ll render3d: VkAllocationCallbacks counted (R3D_ALLOC_VK), pipeline create infos freed, actor pool at init 2026-09-28 15:46:19 +03:00
win32.ll feat(render3d): Vulkan in a macOS window through MoltenVK; window built-ins take a slice's elements; the NEAR_FADE SPIR-V 2026-09-27 00:52:45 +03:00
win32_gl.ll feat(windows): a window sized by the display's scale, as a Retina Mac does 2026-09-13 02:46:00 +03:00
xml.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00
zstd.ludic wip(0.S3): the runtime migrated - ludic migrate state --runtime <every program>: 331 vars into 25 states (RtInputState, RtGlState, ...), 2 lets; its states are made before it boots; no module-level var is let through outside --globals 2026-09-25 16:02:12 +03:00