Skip to content

Record anywhere - #9540

Merged
grliszas14 merged 6 commits into
audacity:masterfrom
grliszas14:record_anywhere
Oct 10, 2025
Merged

grliszas14 merged 6 commits into
audacity:masterfrom
grliszas14:record_anywhere

Conversation

@grliszas14

@grliszas14 grliszas14 commented Oct 3, 2025 •

Copy link
Copy Markdown
Contributor

Resolves: #9403

  • 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

@grliszas14
grliszas14 marked this pull request as ready for review October 6, 2025 10:35
Comment thread src/record/internal/au3/au3record.cpp Resolved
@kryksyh

kryksyh commented Oct 7, 2025 •

Copy link
Copy Markdown
Member

Another issue, is that the project file is twice as large as on master when recording with same settings. Running vacuum fixes it, so this is probably is not a direct result of this PR, but a side effect of creating and deleting temporary clips

image

Comment thread src/record/internal/au3/au3record.cpp Resolved
Comment thread src/record/internal/au3/au3record.h Resolved
Comment thread src/record/internal/au3/au3record.cpp Resolved
Track* PendingTracks::FindPendingTrack(const Track& track) const
{
auto pTrack = &track;
if (!mPendingUpdates->empty()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe find_if would work fine even if the container is empty, maybe something like this would be easier to read

Track* PendingTracks::FindPendingTrack(const Track& track) const
{
    auto id = track.GetId();
    auto pred = [id](const auto& pTrack) {
        return pTrack->GetId() == id;
    };

    auto it = std::find_if(mPendingUpdates->begin(), mPendingUpdates->end(), pred);
    return it != mPendingUpdates->end() ? *it : nullptr;
}


// audio thread updates the pending clip
// make original clip point to the pending clip's data
origClip->LinkToOtherSource(*pendingClip.get());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's very nice, this way we could make shallow copies that do not detach on edit

Comment thread src/record/internal/au3/au3record.cpp Resolved
@grliszas14
grliszas14 merged commit 1c3f903 into audacity:master Oct 10, 2025
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.

Recording should honor Playhead Cursor

3 participants