Skip to content

Fixed PCM endianness bug#32

Merged
hendriks73 merged 2 commits into
devfrom
hendrik/fix_aiff_byte_order_issue
May 17, 2026
Merged

Fixed PCM endianness bug#32
hendriks73 merged 2 commits into
devfrom
hendrik/fix_aiff_byte_order_issue

Conversation

@hendriks73

Copy link
Copy Markdown
Owner

Install a PCM encoder when the decoded output needs byte-order adjustment:

  • 24-bit: decoder outputs S32-padded frames; encoder repacks to 24-bit
  • multi-byte big-endian sources: FFmpeg's PCM decoder produces native-LE frames regardless of the on-disk byte order, so without an encoder the Java buffer would receive LE bytes while the AudioFormat reports BE.

This bug showed up, when decoding AIFF files.

@hendriks73 hendriks73 self-assigned this May 17, 2026
@hendriks73 hendriks73 added the bug label May 17, 2026
@hendriks73 hendriks73 merged commit a7f231b into dev May 17, 2026
61 of 68 checks passed
@hendriks73 hendriks73 deleted the hendrik/fix_aiff_byte_order_issue branch May 17, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant