Skip to content

8676 effects list deepcopy on cloning - #11315

Merged
embarc-gabriel merged 1 commit into
audacity:masterfrom
embarc-gabriel:8676-clone-effect-list-using-deep-copy
Jul 1, 2026
Merged

embarc-gabriel merged 1 commit into
audacity:masterfrom
embarc-gabriel:8676-clone-effect-list-using-deep-copy

Conversation

@embarc-gabriel

@embarc-gabriel embarc-gabriel commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Resolves: #8676

When cloning the effect list do a deep copy instead of a shallow copy.
This was cherry-picked from au3 without the history part #4169

Adding the effect parameter change to the history will be implemented on: #11322

  • 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

@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: f766d691-652c-4648-98a0-82eb9ba83e1e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b26250bce48038c3822cf5a8f30891ec3dce207 and 5818d61.

📒 Files selected for processing (3)
  • au3/libraries/au3-realtime-effects/RealtimeEffectList.cpp
  • au3/libraries/au3-realtime-effects/RealtimeEffectState.cpp
  • au3/libraries/au3-realtime-effects/RealtimeEffectState.h
✅ Files skipped from review due to trivial changes (1)
  • au3/libraries/au3-realtime-effects/RealtimeEffectState.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • au3/libraries/au3-realtime-effects/RealtimeEffectState.h
  • au3/libraries/au3-realtime-effects/RealtimeEffectList.cpp

📝 Walkthrough

Walkthrough

Changes

RealtimeEffectState adds a new Clone() const method in the header and .cpp that creates a new state with the same ID, copies mPlugin, and copies mMainSettings. RealtimeEffectList::Clone() now builds a new list, clones each entry in mStates with pState->Clone(), and restores the active flag with SetActive(IsActive()).

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

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: deep-copying the effects list when cloning.
Description check ✅ Passed The description includes the linked issue, summarizes the change, and fills the required checklist items.
Linked Issues check ✅ Passed The deep-clone changes address the shared-effect-instance bug described in #8676.
Out of Scope Changes check ✅ Passed The diff stays focused on cloning behavior and the supporting Clone methods, with no obvious unrelated changes.

Warning

Review ran into problems

🔥 Problems

Linked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. 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.

@embarc-gabriel
embarc-gabriel force-pushed the 8676-clone-effect-list-using-deep-copy branch from 0b26250 to 5818d61 Compare July 1, 2026 11:58
@embarc-gabriel
embarc-gabriel merged commit 00aff73 into audacity:master Jul 1, 2026
12 checks passed
@embarc-gabriel
embarc-gabriel deleted the 8676-clone-effect-list-using-deep-copy branch August 28, 2026 10:22
grliszas14 pushed a commit to kryksyh/audacity that referenced this pull request Sep 21, 2026
Instead of deep copy everything we will make effect deep copies where it is needed

Assisted-by: Claude Code 2.1.273 (Claude Fable 5.1)
saintmatthieu pushed a commit to kryksyh/audacity that referenced this pull request Sep 23, 2026
Instead of deep copy everything we will make effect deep copies where it is needed

Assisted-by: Claude Code 2.1.273 (Claude Fable 5.1)
saintmatthieu pushed a commit to kryksyh/audacity that referenced this pull request Sep 23, 2026
Instead of deep copy everything we will make effect deep copies where it is needed

Assisted-by: Claude Code 2.1.273 (Claude Fable 5.1)
kryksyh added a commit that referenced this pull request Sep 23, 2026
Instead of deep copy everything we will make effect deep copies where it is needed

Assisted-by: Claude Code 2.1.273 (Claude Fable 5.1)
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.

After duplicating a track, each instance of the effect in the stack is shared across all copies of the track

2 participants