libs/audio
Low-Latency Sound Engine & Audio Mixer
A low-latency audio framework built for game engines, desktop apps, and interactive audio workstations. Directly interfaces with Windows WASAPI and CoreAudio to deliver glitch-free sound synthesis, WAV/OGG decoding, and spatial 3D audio panning.

High-Throughput Systems Foundation
Engineered to maximize CPU instruction pipelining and data cache locality. Every algorithm avoids heap pointer indirection wherever contiguous stack or arena buffers can be employed.

import "libs/audio/engine.kl" as snd;
fn main() -> int32 {
let engine: snd.AudioEngine = snd.init_engine(44100, 2);
let sound: snd.Sound = snd.load_wav("assets/chime.wav");
snd.play(&engine, &sound, 1.0, 0.0); // Volume 1.0, Center pan
snd.sleep_ms(1000);
snd.shutdown(&engine);
return 0;
}Deterministic command-line invocations to build, link native dynamic dependencies, and run automated regression tests:
kale build tests/test_audio.kl -o bin/test_audio.exe -lole32./bin/test_audio.exeGPG Key 1B917D4779A6102E • Continuous integration with automated symbol verification.
High-priority audio thread reads samples without locking or memory allocation stalls.
Dynamic volume, pitch shift, stereo panning, and spatial 3D attenuation for multiple concurrent sounds.
Sine, square, triangle, and sawtooth wave generators with ADSR envelope modulation.