Skip to content

Conversation

umurgdk
Copy link

@umurgdk umurgdk commented Oct 3, 2025

When configurations such as sample rate and number of channels are left empty there is no way to query that information back after the device is initialized with system defaults. This PR adds these methods to Device:

fn getSampleRate(device: *const Device) u32 {}
fn getPlaybackFormat(device: *const Device) Format {}
fn getPlaybackChannels(device: *const Device) u32 {}

One quick fix on memory allocation on zaudioMalloc function to manually inlining std.mem.Alignment.fromByteUnits to keep this library backward compatible with zig v0.14.0

@umurgdk
Copy link
Author

umurgdk commented Oct 4, 2025

Sorry about not checking the actual compatibility results. I've ran tests successfully on my latest fix commit on both 0.14.1 and 0.15.1

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