Skip to content

make WaveFormat comparable - #75

Merged
HEnquist merged 1 commit into
HEnquist:masterfrom
LastExceed:waveformat-cmp
Oct 24, 2026
Merged

HEnquist merged 1 commit into
HEnquist:masterfrom
LastExceed:waveformat-cmp

Conversation

@LastExceed

Copy link
Copy Markdown
Contributor

These impls cannot be derived because the underlying WAVEFORMATEXTENSIBLE doesn't derive them either (which in turn is probably because of its packed memory layout).

I'd like to bring attention to the Eq impl in particular, because the WAVEFORMATEX vs WAVEFORMATEXTENSIBLE difference is something that would be well represented by only implementing PartialEq. However, since WaveFormat always uses the latter as the underlying storage type, information about the difference is already lost during creation, so Eq should be fair game at this point.

@HEnquist

Copy link
Copy Markdown
Owner

Looks good, I'll merge and make a new release soon.

@HEnquist
HEnquist merged commit 84e5ddd into HEnquist:master Oct 24, 2026
3 checks passed
@HEnquist HEnquist mentioned this pull request Oct 24, 2026
HEnquist added a commit that referenced this pull request Oct 25, 2026
make `WaveFormat` comparable

(cherry picked from commit 84e5ddd)
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.

2 participants