Skip to content

11568 prefer lossy format on cloud audio preview - #11908

Merged
embarc-gabriel merged 3 commits into
audacity:masterfrom
embarc-gabriel:11568-prefer-loss-format-on-cloud-audio-preview
Sep 7, 2026
Merged

embarc-gabriel merged 3 commits into
audacity:masterfrom
embarc-gabriel:11568-prefer-loss-format-on-cloud-audio-preview

Conversation

@embarc-gabriel

@embarc-gabriel embarc-gabriel commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Resolves: #11568

(short description of the changes and the motivation to make the changes)

  • 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

@embarc-gabriel embarc-gabriel changed the title 11568 prefer loss format on cloud audio preview 11568 prefer lossly format on cloud audio preview Sep 3, 2026
@embarc-gabriel embarc-gabriel changed the title 11568 prefer lossly format on cloud audio preview 11568 prefer lossy format on cloud audio preview Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a preferLossless parameter to cloud audio format APIs and forwards it through the exporter and configuration layers. Audio preview export requests non-lossless preferred formats. The preview upload now returns the cloud project page URL. The project actions controller validates the URL and opens it instead of showing an informational dialog.

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

Merge Risk: 🟠 High · up to 8bf14

Cloud previews can still be uploaded in the incompatible lossy format, leaving the primary waveform-preview workflow broken. This should be corrected before merge.

Sequence Diagram(s)

sequenceDiagram
  participant ProjectActionsController
  participant Au3AudioComService
  participant Au3Exporter
  participant Au3CloudConfiguration
  participant platformInteractive
  ProjectActionsController->>Au3AudioComService: updateAudioPreview
  Au3AudioComService->>Au3Exporter: cloudPreferredAudioFormats(false)
  Au3Exporter->>Au3CloudConfiguration: preferredAudioFormats(false)
  Au3AudioComService->>Au3AudioComService: upload preview and return projectPage
  Au3AudioComService-->>ProjectActionsController: upload result containing projectPage
  ProjectActionsController->>platformInteractive: openUrl(projectPage)
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the issue reference and checklist responses, but it leaves the required short description and motivation section empty. The QA section also does not state whether testing was … Add a short description of the changes and their motivation. State the QA status clearly, including which Testflow cases were run or why they were not run.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address the broken cloud preview workflow by selecting a preview audio format, returning the cloud project URL after upload, and opening that URL for browser verification. These changes al…
Out of Scope Changes check ✅ Passed The changes are limited to cloud preview format selection, preview upload result handling, project-page navigation, and the required interface and stub updates. No unrelated changes are evident.
Title check ✅ Passed The title is concise and directly describes the main code change: using a lossy format for cloud audio previews.
Full details: Description check

Explanation

The description includes the issue reference and checklist responses, but it leaves the required short description and motivation section empty. The QA section also does not state whether testing was performed beyond the unchecked box.

Warning

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.

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Team

Run ID: 701d118e-b81c-4d20-9590-d08018b1a614

📥 Commits

Reviewing files that changed from the base of the PR and between a999a9c and 2460e0c1baf98a986760fe6231837d8df284aaed.

📒 Files selected for processing (10)
  • src/au3cloud/iau3cloudconfiguration.h
  • src/au3cloud/internal/au3audiocomservice.cpp
  • src/au3cloud/internal/au3cloudconfiguration.cpp
  • src/au3cloud/internal/au3cloudconfiguration.h
  • src/importexport/export/iexporter.h
  • src/importexport/export/internal/au3/au3exporter.cpp
  • src/importexport/export/internal/au3/au3exporter.h
  • src/project/internal/projectactionscontroller.cpp
  • src/stubs/au3cloud/au3cloudconfigurationstub.cpp
  • src/stubs/au3cloud/au3cloudconfigurationstub.h

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@@ -632,7 +633,7 @@ muse::RetVal<muse::ProgressPtr> Au3AudioComService::updateAudioPreview(au::proje
return;
}

const auto preferredFormats = self->exporter()->cloudPreferredAudioFormats();
const auto preferredFormats = self->exporter()->cloudPreferredAudioFormats(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

printf '%s\n' '--- changed file context ---'
sed -n '600,655p' src/au3cloud/internal/au3audiocomservice.cpp
printf '%s\n' '--- bound declarations and implementations ---'
rg -n -C 5 'cloudPreferredAudioFormats|preferLossless' src
printf '%s\n' '--- relevant diff summary ---'
git diff -- src/au3cloud/internal/au3audiocomservice.cpp

Repository: audacity/audacity

Length of output: 12249


🏁 Script executed:

printf '%s\n' '--- preferred-format implementation ---'
rg -n -C 12 'GetPreferredAudioFormats|PreferredAudioFormats' src libraries
printf '%s\n' '--- preview and export call-site context ---'
sed -n '960,1025p' src/au3cloud/internal/au3audiocomservice.cpp
rg -n -C 8 'cloudPreferredAudioFormats\(' src

Repository: audacity/audacity

Length of output: 24832


🏁 Script executed:

rg -n -C 15 'GetPreferredAudioFormats|preferredAudioFormats\(' .

Repository: audacity/audacity

Length of output: 22371


Pass true for the lossless preview path.

GetPreferredAudioFormats(false) returns only audio/mpeg. The preview selects the first returned format, so it uses a lossy format instead of the intended lossless format.

@embarc-gabriel
embarc-gabriel force-pushed the 11568-prefer-loss-format-on-cloud-audio-preview branch from 2460e0c to 6339b8f Compare September 7, 2026 14:01
@embarc-gabriel
embarc-gabriel force-pushed the 11568-prefer-loss-format-on-cloud-audio-preview branch from 6339b8f to 8bf146d Compare September 7, 2026 14:07
@embarc-gabriel
embarc-gabriel merged commit eb93ad5 into audacity:master Sep 7, 2026
17 checks passed
kryksyh added a commit that referenced this pull request Sep 22, 2026
11568 prefer lossy format on cloud audio preview (#11908)
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.

Project audio preview is broken

2 participants