Skip to content

fix multichannel flac import [au3] - #10681

Merged
kryksyh merged 1 commit into
audacity:audacity3from
kryksyh:fix_multichannel_flac_import_au3
Apr 14, 2026
Merged

kryksyh merged 1 commit into
audacity:audacity3from
kryksyh:fix_multichannel_flac_import_au3

Conversation

@kryksyh

@kryksyh kryksyh commented Apr 8, 2026

Copy link
Copy Markdown
Member

Resolves: #6381

cherry pick of: #10679

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

QA:

  • Autobot test cases have been run

@kryksyh
kryksyh requested a review from grliszas14 April 8, 2026 17:03
@kryksyh kryksyh self-assigned this Apr 8, 2026
@coderabbitai

coderabbitai Bot commented Apr 8, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: a16475aa-b43a-47eb-9387-37f2a0107eb3

📥 Commits

Reviewing files that changed from the base of the PR and between c3700c6 and 6c1430c.

📒 Files selected for processing (1)
  • modules/import-export/mod-flac/ImportFLAC.cpp

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced FLAC import to properly create multiple tracks when importing multi-channel audio files

Walkthrough

The import flow for FLAC files has been modified to handle multi-channel audio correctly. The FLACImportFileHandle class now stores multiple tracks via TrackListHolder mTracks instead of a single WaveTrack::Holder mTrack. During frame decoding, channel data is appended across all tracks via ImportUtils::ForEachChannel(). Track creation now generates multiple tracks based on channel count using trackFactory->CreateMany(), and import finalization delegates to ImportUtils::FinalizeImport() with the full track list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix multichannel flac import [au3]' directly addresses the main change—fixing multi-channel FLAC import—matching the linked issue #6381 about multi-channel audio being imported as mono.
Description check ✅ Passed The PR description includes the required template sections: issue link, cherry-pick reference, CLA attestation, and completed checklist items confirming descriptive title, reviewable commits, and no unnecessary changes.
Linked Issues check ✅ Passed The code changes directly address issue #6381 by replacing single-track storage with multi-track support, using TrackListHolder and CreateMany() to properly handle multi-channel FLAC imports instead of ignoring extra channels.
Out of Scope Changes check ✅ Passed All changes are confined to ImportFLAC.cpp's private members and internal implementation, directly addressing the multi-channel FLAC import bug with no extraneous modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@kryksyh kryksyh linked an issue Apr 8, 2026 that may be closed by this pull request
@kryksyh
kryksyh merged commit 291d0bc into audacity:audacity3 Apr 14, 2026
8 of 9 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.

Multi-channel is added as one mono channel

2 participants