Skip to content

Add an "Other…" custom sample rate option to the export dialog - #11375

Merged
grliszas14 merged 2 commits into
audacity:masterfrom
grliszas14:export_other
Jul 8, 2026
Merged

grliszas14 merged 2 commits into
audacity:masterfrom
grliszas14:export_other

Conversation

@grliszas14

Copy link
Copy Markdown
Contributor

Resolves: #9062

  • 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:

  • Testflow test cases have been run

@grliszas14
grliszas14 requested a review from embarc-gabriel July 7, 2026 14:03
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 59433741-1ff3-437d-8356-fbc8bbd73138

📥 Commits

Reviewing files that changed from the base of the PR and between 5ec0856db3db1a32fe3860a8fb4457544533cd4b and 2edd546.

📒 Files selected for processing (3)
  • src/importexport/export/view/exportpreferencesmodel.cpp
  • src/importexport/export/view/exportpreferencesmodel.h
  • src/trackedit/qml/Audacity/TrackEdit/CustomRateDialog.qml

📝 Walkthrough

Walkthrough

ExportPreferencesModel now supports a custom "Other…" sample-rate path. It adds label helpers, includes an "Other…" entry when codecs accept any rate, opens a custom-rate dialog on selection, applies resolved custom rates to the export configuration, and preserves an existing positive custom rate in the any-rate case. The QML custom-rate dialog no longer declares a title property.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ExportPreferencesModel
  participant CustomRateDialog

  User->>ExportPreferencesModel: select "Other…"
  ExportPreferencesModel->>CustomRateDialog: open audacity://trackedit/custom_rate
  CustomRateDialog-->>ExportPreferencesModel: resolve or reject
  ExportPreferencesModel->>ExportPreferencesModel: update export configuration when resolved
  ExportPreferencesModel->>ExportPreferencesModel: emit exportSampleRateListChanged and exportSampleRateChanged
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes add an Other... sample-rate option that opens a custom-rate dialog, matching issue #9062's requirements.
Out of Scope Changes check ✅ Passed The modified files and behavior stay focused on the export sample-rate UI and custom-rate dialog, with no clear unrelated additions.
Title check ✅ Passed The title clearly matches the main change: adding an "Other…" custom sample rate option to the export dialog.
Description check ✅ Passed The description includes the issue link and the required checklist items, with only the brief change summary/motivation section not explicitly filled out.

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

void ExportPreferencesModel::openCustomSampleRateDialog()
{
muse::UriQuery customRateUri("audacity://trackedit/custom_rate");
customRateUri.addParam("title", muse::Val(muse::trc("export", "Set sample rate")));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you remove the title property from the QML component? Because this title is not being set there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/importexport/export/view/exportpreferencesmodel.cpp (1)

397-406: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Custom-rate entry is appended out of numeric order.

The custom-rate entry is always appended right before "Other…", regardless of its numeric value relative to the preceding default rates. If the custom rate is smaller than some entries already in the list (e.g. 12000 after 96000), the dropdown will show it out of ascending order.


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: ecdd4ebf-6494-4679-9fc6-6195713ba9bf

📥 Commits

Reviewing files that changed from the base of the PR and between f4a99b5a286ca024ce7a4acfe8fbc414f71551ce and 5ec0856db3db1a32fe3860a8fb4457544533cd4b.

📒 Files selected for processing (3)
  • src/importexport/export/view/exportpreferencesmodel.cpp
  • src/importexport/export/view/exportpreferencesmodel.h
  • src/trackedit/qml/Audacity/TrackEdit/CustomRateDialog.qml
💤 Files with no reviewable changes (1)
  • src/trackedit/qml/Audacity/TrackEdit/CustomRateDialog.qml
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/importexport/export/view/exportpreferencesmodel.h

@grliszas14
grliszas14 merged commit 57a5963 into audacity:master Jul 8, 2026
4 of 10 checks passed
@grliszas14
grliszas14 deleted the export_other branch July 8, 2026 11:43
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.

Export: "Other..." sample rate option is missing

2 participants