Skip to content

Update miniaudio to v0.11.25 - #17

Merged
hazeycode merged 5 commits into
zig-gamedev:mainfrom
thedaneeffect:main
Mar 5, 2026
Merged

hazeycode merged 5 commits into
zig-gamedev:mainfrom
thedaneeffect:main

Conversation

@thedaneeffect

Copy link
Copy Markdown
Contributor

Summary

  • Update bundled miniaudio from v0.11.22 to v0.11.25
  • Fix Engine.Config and Sound.Config struct layouts for fields added in v0.11.24 (ma_resampler_config for pitch/resource manager resampling)
  • Fix ABI mismatch: ma_sound_seek_to_second extern declared as f64 but C takes float
  • Fix signed/unsigned mismatch in zaudioAudioBufferConfigInit (ma_int64 → ma_uint64)

Closes #16

Test plan

  • zig build test passes on macOS (arm64)
  • zig build test passes on Linux (arm64, Docker)

ma_engine_config gained resourceManagerResampling and pitchResampling
fields (two ma_resampler_config, 96 bytes total) in v0.11.24. Without
these fields the C init function overwrites past the Zig struct,
corrupting the stack.
ma_sound_config also gained a pitchResampling field (ma_resampler_config,
48 bytes) between pEndCallbackUserData and initNotifications in v0.11.24.
Same class of bug as the Engine.Config fix — C init function overwrites
past the Zig struct without this field.
ma_sound_seek_to_second takes float (f32) in C, but the Zig extern
declared f64, causing the value to be misinterpreted at the FFI boundary.

zaudioAudioBufferConfigInit declared ma_int64 for size_in_frames but
ma_audio_buffer_config_init expects ma_uint64.
@thedaneeffect thedaneeffect changed the title Update miniaudio to v0.11.25 Update miniaudio to v0.11.25 Mar 4, 2026
@thedaneeffect thedaneeffect changed the title Update miniaudio to v0.11.25 Update miniaudio to v0.11.25 Mar 4, 2026
@hazeycode
hazeycode requested a review from Copilot March 5, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the bundled miniaudio dependency to v0.11.25 and aligns zaudio’s Zig/C ABI surface with upstream changes introduced in miniaudio v0.11.24+.

Changes:

  • Bump documented bundled miniaudio version to v0.11.25.
  • Fix Engine.Config / Sound.Config extern struct layouts to include new ma_resampler_config fields for resource-manager and pitch resampling.
  • Correct ABI mismatches in extern function/parameter types (ma_sound_seek_to_second uses float and audio buffer frame counts are unsigned 64-bit).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/zaudio.zig Updates extern struct layouts and corrects ma_sound_seek_to_second signature to match upstream (float).
src/zaudio.c Fixes zaudioAudioBufferConfigInit frame-count parameter type to ma_uint64 to match miniaudio.
README.md Updates the stated bundled miniaudio version to v0.11.25.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hazeycode
hazeycode merged commit e5b89fd into zig-gamedev:main Mar 5, 2026
7 checks passed
@hazeycode

Copy link
Copy Markdown
Member

Thanks!

@nathany nathany mentioned this pull request Jul 6, 2026
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.

Update miniaudio to v0.11.25

3 participants