Skip to content

Feature/audio ext v1#135

Open
Pcothren wants to merge 2 commits intoPilotLightTech:masterfrom
Pcothren:feature/audio-ext-v1
Open

Feature/audio ext v1#135
Pcothren wants to merge 2 commits intoPilotLightTech:masterfrom
Pcothren:feature/audio-ext-v1

Conversation

@Pcothren
Copy link
Contributor

Summary
Implements a first usable version of pl_audio_ext (previously placeholder) and adds a minimal audio
example for runtime validation.

What changed

  • Added a backend-agnostic plAudioI v1 API in extensions/pl_audio_ext.h
  • Implemented pl_audio_ext in extensions/pl_audio_ext.c using vendored miniaudio
  • Added examples/example_basic_audio_0.c (generated chiptune-style tone, no external assets)
  • Patched examples/build_win32.bat to build example_basic_audio_0

Audio API (v1)

  • initialize / cleanup / update
  • create clip from memory / file
  • play / stop / stop_all / is_playing
  • master and voice volume controls

Implementation notes

  • Extension state is stored via plDataRegistryI for reload-safe lifecycle
  • Public API is backend-agnostic; backend implementation is internal to pl_audio_ext.c
  • Vendored dependency: dependencies/miniaudio/miniaudio.h
  • v1 is intentionally minimal (no 3D audio / streaming / DSP yet)

Tested (Windows)

  • tests\build_win32.bat
  • src\build_win32.bat
  • examples\build_win32.bat
  • out\pilot_light_c.exe
  • out\pilot_light_cpp.exe
  • out\pilot_light.exe -a tests_c
  • out\pilot_light.exe -a tests_cpp
  • out\pilot_light.exe --disable_vt -a example_basic_audio_0

@Pcothren Pcothren requested a review from hoffstadt as a code owner February 26, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant