Skip to content

9402 extra playback cleanups - #9692

Merged
luapmartin merged 60 commits into
audacity:masterfrom
luapmartin:luapmartin/9402-2-adding-tests
Nov 13, 2025
Merged

luapmartin merged 60 commits into
audacity:masterfrom
luapmartin:luapmartin/9402-2-adding-tests

Conversation

@luapmartin

@luapmartin luapmartin commented Oct 17, 2025 •

Copy link
Copy Markdown
Contributor

Resolves:

  • 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

please review

  • playback actions (space bar, buttons, play pause stop rewind start/end...))
  • record actions (rec start/stop... buttons/ shortcuts)
  • selection (clip and time selection) + playback

pay particular attention to the auto-stop (at the end of selection or end of project ) + restarting-playback
please test after the playback stop when reaching the end of the project or the end of a selection to start again the playback
@chinakov @dozzzzer thanks

@luapmartin luapmartin self-assigned this Oct 17, 2025
@luapmartin
luapmartin force-pushed the luapmartin/9402-2-adding-tests branch 2 times, most recently from 9c8affa to 82971fa Compare October 21, 2025 14:53
@luapmartin
luapmartin marked this pull request as ready for review October 21, 2025 15:36
@luapmartin luapmartin mentioned this pull request Oct 21, 2025
13 of 20 tasks
@@ -32,7 +32,7 @@ void PlaybackController::init()
{
dispatcher()->reg(this, PLAY_CODE, this, &PlaybackController::togglePlay);
dispatcher()->reg(this, PAUSE_CODE, this, &PlaybackController::pause);
dispatcher()->reg(this, STOP_CODE, this, &PlaybackController::stop);
dispatcher()->reg(this, PLAYBACK_STOP_CODE, this, &PlaybackController::stopAction);

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.

Nitpick.
As we have discussed before, isn't it better to keep the consistency? In my opinion, we should either change all codes to PLAYBACK... and the handlers to somethingAction, or we can leave it as it was before.

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.

I agree with you I would like to do PLAYBACK_ for all those codes and have Action suffix, I can do that if it's ok in the scope if this PR

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.

that means also adding the "playback/..." prefix to the actioncode texts

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.

should I do that in this PR? @embarc-gabriel

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.

It is up to you.
If this does not take too much time, IMO it's worth it.

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.

on my side I got some troubles in another issue with using the action:// prefix so I end-up not using it, let's see what @igorkorsukov says, thanks

@igorkorsukov igorkorsukov Nov 11, 2025 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!
Sometimes the action code contains action::// prefix and other times it doesn´t.
Can you explain to me when this should be added?

There is now a leisurely migration from one approach to another.
Old approach:
We have a text code (ActionCode) for the action (for example, "play", "clip-split") and parameters are passed separately (ActionData) if the action has any.

New approach:
We replace the code with URI and the parameters can be passed as query (ActionQuery)

The new approach has many advantages, just like simply replacing the code with a URI - it adds semantics about what it is (actions) and what area it belongs to, like action://playback/play instead of play
Passing parameters via query is also convenient in many cases, for example in a dynamic menu, like a list of effects, where the action is "open effect" and the parameter is "what effect", like action://effects/open?effectId=...

It's better to switch to the new system quickly so there aren't two. But no one is forcing it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I got some troubles in another issue with using the action:// prefix

To understand, please tell us what problems you encountered?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is a URI with a schema (action://playback/play) better than just playback/play (module/action) ?
The schema shows what exactly it is and what to do with it. For example, there are URIs passed to the interactive, like opening a dialog, there are settings codes, and so on. The schema determines that this isn't a settings code, for example (playback/somekey), but an action.
The second reason is that it's convenient to work with a ready-made class (Uri) that can parse a URI into its parts, including queries.

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.

@embarc-gabriel and @igorkorsukov I got those actions codes converted to action query and I cleaned-up naming it should be good now.

@luapmartin
luapmartin force-pushed the luapmartin/9402-2-adding-tests branch 8 times, most recently from 13071f1 to a411f09 Compare October 24, 2025 09:29
@luapmartin

luapmartin commented Oct 24, 2025 •

Copy link
Copy Markdown
Contributor Author

this PR is containing both the 3-fixes from #9731 and some extra refactor, we could have a look at it after the fixes are merged, thanks

@luapmartin
luapmartin force-pushed the luapmartin/9402-2-adding-tests branch 3 times, most recently from b9cf2f5 to 3e46847 Compare October 31, 2025 15:12
@luapmartin
luapmartin force-pushed the luapmartin/9402-2-adding-tests branch from 3e46847 to ca437fb Compare November 3, 2025 12:10
@luapmartin
luapmartin force-pushed the luapmartin/9402-2-adding-tests branch from 635815a to 5732a44 Compare November 12, 2025 11:31
@dozzzzer

Copy link
Copy Markdown
Contributor

@luapmartin

The stop via button click doesn't work:

2025-11-12_14-51-24 (1)

@dozzzzer dozzzzer moved this from In QA to In Progress in [AU4] Main Board(archive) Nov 12, 2025
@luapmartin luapmartin moved this from In Progress to Ready for QA in [AU4] Main Board(archive) Nov 12, 2025
@chinakov chinakov self-assigned this Nov 13, 2025
@chinakov chinakov moved this from Ready for QA to In Progress in [AU4] Main Board(archive) Nov 13, 2025
@chinakov chinakov moved this from In Progress to Ready for QA in [AU4] Main Board(archive) Nov 13, 2025
@dozzzzer dozzzzer moved this from Ready for QA to In QA in [AU4] Main Board(archive) Nov 13, 2025
@dozzzzer

Copy link
Copy Markdown
Contributor

Tested

@dozzzzer dozzzzer moved this from In QA to Ready for Merge in [AU4] Main Board(archive) Nov 13, 2025
@luapmartin
luapmartin merged commit 3635b08 into audacity:master Nov 13, 2025
@github-project-automation github-project-automation Bot moved this from Ready for Merge to Done in [AU4] Main Board(archive) Nov 13, 2025
@luapmartin
luapmartin deleted the luapmartin/9402-2-adding-tests branch February 26, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants