Skip to content

Fix null event context and peak values write - #80

Merged
HEnquist merged 2 commits into
masterfrom
fix-session-events-and-peaks
Oct 24, 2026
Merged

HEnquist merged 2 commits into
masterfrom
fix-session-events-and-peaks

Conversation

@HEnquist

Copy link
Copy Markdown
Owner

Fixes two unsafe callback/FFI issues.

The docs allow the event context to be null, so read it, and the new
grouping param, through a helper that turns a null pointer into GUID_NULL.
Also return after reporting every channel when OnChannelVolumeChanged gets
u32::MAX, instead of falling through to a spurious warning.

Fixes #78
The generated wrapper passes a pointer from a shared reborrow, and Windows
writing the peak values through it is undefined behaviour. Call the vtable
entry directly with peaks.as_mut_ptr() instead.

Fixes #79
@HEnquist
HEnquist merged commit 99ec381 into master Oct 24, 2026
3 checks passed
@HEnquist HEnquist mentioned this pull request Oct 24, 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.

get_channels_peak_values passes a read-only pointer to a call that writes through it Small fixes in the session event callbacks

1 participant