Skip to content

fix ASIO struct layout - #14

Merged
LastExceed merged 2 commits into
LastExceed:masterfrom
singularpoint:fix/asio-struct-layout
Oct 23, 2026
Merged

LastExceed merged 2 commits into
LastExceed:masterfrom
singularpoint:fix/asio-struct-layout

Conversation

@singularpoint

@singularpoint singularpoint commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Match the ASIO SDK’s 4-byte packing for TimeCode, TimeInfo, Time, BufferInfo, and Callbacks. On Windows x64, this corrects their alignment and reduces TimeCode from 88 to 84 bytes and Time from 152 to 148 bytes.

Give I64Split a C representation to guarantee the SDK’s hi, lo field order. Derive Copy for TimeCode and TimeInfo so the existing derives on packed Time continue to compile.

Direct references to fields requiring greater alignment than the packed struct permits must now be replaced with copies into local variables.

Fixes #13

@LastExceed

Copy link
Copy Markdown
Owner

Thanks, this is definitely an oversight of mine.

@LastExceed
LastExceed merged commit 96ef8db into LastExceed:master Oct 23, 2026
2 checks passed
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.

Windows x64: ASIO FFI types have incompatible size and alignment

2 participants