RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process
Audio player
rediwm-player is a background player for one file at a time, written in C
with GIO (like files/volumes.c, no Zig). Files starts it and follows it
(files/player_link.c, files/app_audio.zig); the taskbar sees only its
StatusNotifier item.
- One instance per session, owned by the bus name
org.mpris.MediaPlayer2.rediwm. A secondrediwm-player FILEforwardsOpenUriand exits; losing the name race forwards too. MPRIS (mpris.c) is the only control surface: Files,playerctland the tray menu all go through the sameplayer_*functions inmain.c. Keep MPRIS standard (no extra properties); Files readsPositiononPropertiesChanged/Seekedand extrapolates. - Idle makes no wakeups. The miniaudio device runs only while playing
(
rp_engine_pausestops it), there are no timers, and the process exits when the track ends orStop/Quitarrives. Nothing may pollPosition. - The audio callback never blocks or allocates. Seeks while playing are an atomic request applied by the callback; while paused the decoder is touched directly (the device is stopped). New tracks reopen decoder and device.
- Formats: miniaudio's built-in WAV, FLAC and MP3 only, listed in
formats.zig(Files imports it: add an extension there only with a decoder behind it). Vorbis/Opus/AAC need extra decoding backends. - Backends are dlopen'd at run time and the null device is deliberately not
in the list.
-DRP_TEST_NULL_DEVICE(build/player.zig) builds the noninstalledrediwm-player-testfixture fortests/files_audio.py(zig build test-files-audio), whose paced null device reaches no host audio; never use it in the installed binary, and never add an environment switch for it. - App scope:
--scope(passed by Files perterminalScopes()) makes the player place itself in its ownapp.slicescope when it wins the name (tray_place_scope). - The tray icon is drawn in
tray.c(straight, not premultiplied, network ARGB) so no icon theme is needed;ItemIsMenumakes a click open the menu. Menu labels are English: this C program has no i18n yet. - miniaudio is vendored in
third_party/miniaudio/(v0.11.22, public domain / MIT-0) and compiled only inminiaudio_impl.c, as its own library with UBSan off and no-Werror.