Skip to content

Avoid deinterleaving when possible#913

Merged
sbooth merged 2 commits into
mainfrom
no-deinterleave
May 24, 2026
Merged

Avoid deinterleaving when possible#913
sbooth merged 2 commits into
mainfrom
no-deinterleave

Conversation

@sbooth
Copy link
Copy Markdown
Owner

@sbooth sbooth commented May 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 23, 2026 15:23
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 updates the Musepack and MPEG decoders to prefer interleaved float PCM output so they can copy decoded samples directly (via memcpy) instead of performing per-channel deinterleaving loops.

Changes:

  • Switch SFBMusepackDecoder and SFBMPEGDecoder processing formats to interleaved AVAudioPCMFormatFloat32.
  • Replace manual deinterleaving loops with direct bulk copies into the internal AVAudioPCMBuffer storage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Sources/CSFBAudioEngine/Decoders/SFBMusepackDecoder.m Outputs interleaved float PCM and copies decoded interleaved frames directly into _buffer.
Sources/CSFBAudioEngine/Decoders/SFBMPEGDecoder.m Outputs interleaved float PCM and copies mpg123’s decoded interleaved frames directly into _buffer (but frame length calculation needs correction).

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

Comment thread Sources/CSFBAudioEngine/Decoders/SFBMPEGDecoder.m Outdated
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@sbooth sbooth merged commit acfe21d into main May 24, 2026
3 checks passed
@sbooth sbooth deleted the no-deinterleave branch May 24, 2026 22:57
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