Skip to content

Fix scale factor for hybrid WavPack audio#917

Merged
sbooth merged 1 commit into
mainfrom
wavpack-lossy-scale-fix
May 25, 2026
Merged

Fix scale factor for hybrid WavPack audio#917
sbooth merged 1 commit into
mainfrom
wavpack-lossy-scale-fix

Conversation

@sbooth
Copy link
Copy Markdown
Owner

@sbooth sbooth commented May 25, 2026

For hybrid files not decoding as lossless

Copilot AI review requested due to automatic review settings May 25, 2026 16:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects the float normalization applied when decoding lossy WavPack streams, ensuring the integer-to-float conversion uses the correct full-scale range based on the container byte width.

Changes:

  • Adjusts the lossy-path normalization scale factor to use WavpackGetBytesPerSample() (byte container width) instead of WavpackGetBitsPerSample() (nominal bit depth).
  • Minor line reordering in the lossy conversion block (no functional impact beyond the scale change).

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

@sbooth sbooth changed the title Fix scale factor for lossy WavPack audio Fix scale factor for hybrid WavPack audio May 25, 2026
@sbooth sbooth merged commit 32af4f8 into main May 25, 2026
3 checks passed
@sbooth sbooth deleted the wavpack-lossy-scale-fix branch May 25, 2026 17:08
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