1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00

495 Commits

Author SHA1 Message Date
James Crook
b1b1a362ed Doxygen, Clips and Labels
- Classes renamed and better doxygenated
- GetInfo: Type=Clips added
- GetInfo: Type=Labels added.
2018-02-24 14:20:24 -05:00
James Crook
b83b862b3f OldStyleCommandType - It's on the way out.
This renaming makes it clearer which code is still using Dan Horgan's Command system.
2018-02-24 14:20:23 -05:00
James Crook
1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
James Crook
636e137ee8
Merge pull request #257 from Polynomial-C/no_midi
Fix --without-midi build
2018-02-22 17:26:56 +00:00
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
28eeca5fa7 Iterate over the pending tracks for drawing and sizing the scrollbars 2018-02-21 19:20:58 -05:00
Paul Licameli
fa0fb7d8e5 Disable Undo and Redo while there are pending changes in TrackList...
... But perhaps we are developing the means to relax even this ban safely.

For instance, why not undo a mistaken AddLabelPlaying command (Ctrl+M) without
stopping the recording?
2018-02-21 19:20:57 -05:00
Paul Licameli
33cfd92c0a Define TrackId to identify tracks across undo states 2018-02-21 19:20:56 -05:00
Paul Licameli
57ce726a25 Rename Meter as MeterPanel, and some DOxygen 2018-02-21 17:50:28 -05:00
Paul Licameli
ee4f35f288 Rename Lyrics as LyricsPanel, and some DOxygen 2018-02-21 17:32:08 -05:00
Matt Whitlock
e1f0e974d0
Fix --without-midi build
See downstream bug: https://bugs.gentoo.org/637110
2018-02-21 12:19:19 +01:00
Paul Licameli
81b22a2b2b Reimplement the insertion of zeroes at drop-outs...
... and correct for latency only when there is at least one playback track
2018-01-17 12:56:35 -05:00
Paul Licameli
8077c1db04 Change the text of the checkmark for the dropout warning 2018-01-17 10:18:49 -05:00
Paul Licameli
b0cb3868c3 Make a label track named "Dropouts" not "Errors" 2018-01-17 09:35:14 -05:00
Paul Licameli
c2ee1380da Don't indent lines in the dropout warning 2018-01-17 09:21:07 -05:00
Paul Licameli
54553b82b7 Fix things that confused xgettext 2018-01-16 21:45:10 -05:00
Paul Licameli
059e186db6 Treat save-as of a file to its own path as a simple save 2018-01-16 20:05:54 -05:00
Paul Licameli
133bbd927d We can simplify logic further 2018-01-16 20:05:52 -05:00
Paul Licameli
d37c319923 Fewer uses of DirManager::GetProjectName() 2018-01-16 20:05:48 -05:00
Paul Licameli
4d364ee7f3 Remove overwrite argument -- it's always !fromSaveAs 2018-01-16 17:34:27 -05:00
Paul Licameli
1d9b8b7bad Undo confusing tangle of Save and SaveAs each calling the other...
Now Save may call SaveAs, which does not call back; each calls DoSave.
2018-01-16 17:28:43 -05:00
Paul Licameli
130e55cdf5 Use WarningDialog for drop-outs, and change the wording 2018-01-16 13:56:44 -05:00
Paul Licameli
b4ee17ed82 a translation hint 2018-01-15 15:16:15 -05:00
Paul Licameli
9777d3e880 Alert user to drop-outs during recording...
1) When the program detects this, insert zeroes into the recording to keep the
other good parts synchronized.

2) When recording stops, a message box alerts the user, and a label track is
added showing the lost parts, labelled with consecutive numbers.

3) A menu item visible in alpha builds only is added to Tools, to simulate
recording errors at random times and test the reporting feature.
2018-01-15 14:48:39 -05:00
Paul Licameli
4ef8da8f16 Revert "Preliminaries to support better interaction of undo and recording"
This reverts commit 6e75ae58ac56d9c94af5a4ce97951f627808473a, reversing
changes made to 714d53e00f803643131bb775858ac930b39dd5b8.
2018-01-14 21:36:33 -05:00
Paul Licameli
ce5a67a9e9 Iterate over the pending tracks for drawing 2018-01-14 19:04:03 -05:00
Paul Licameli
4ccb695c61 Disable Undo and Redo while there are pending changes in TrackList...
... But perhaps we are developing the means to relax even this ban safely.

For instance, why not undo a mistaken AddLabelPlaying command (Ctrl+M) without
stopping the recording?
2018-01-14 19:03:59 -05:00
Paul Licameli
bd2c7e6abc Define TrackId to identify tracks across undo states 2018-01-14 19:03:54 -05:00
Paul Licameli
0265b8792d More stl idiom for TrackList and its iterators 2018-01-14 16:58:19 -05:00
Paul Licameli
8e0cffb7f2 Simplify GuardedCall and default its return type to void 2018-01-13 01:32:41 -05:00
Paul Licameli
c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
James Crook
0cc9c6bc3b Zoom Toggle
Added preferences for Zoom-Toggle and put into menus.
New helper functions for determining zoom scaling.

Optional EXPERIMENTAL_ZOOM_TOGGLE_BUTTON added, and Light theme updated.
Not enabled for 2.2.2.
2018-01-07 17:14:33 +00:00
Paul Licameli
ab6de1181d No more functor objects; all command handler functions take same args 2018-01-05 09:27:29 -05:00
Paul Licameli
1f7b62f056 AudacityProject::RebuildAllMenuBars is static 2018-01-05 09:19:07 -05:00
Paul Licameli
def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -05:00
Paul Licameli
17b6ca387e Install plug-in by file icon context menu or drop on program icon...
... no longer by drop onto open program window
2018-01-03 03:26:50 -05:00
Paul Licameli
0ec42f3dd2 Fix some English grammar biases...
... Avoid small out-of-context words and phrases in translation catalog that
are then substituted into larger translated phrases with blanks.

(What if my language has declensions?  How do I know the right form to use
for the phrases?)

Instead, give the translators larger in-context phrases to work with, even if
that requires replications of phrases with small variations.
2018-01-02 22:15:33 -05:00
Paul Licameli
e0970ad1e8 Remove unnecesary Format, Printf, casts to wxString 2018-01-01 21:53:51 -05:00
Paul Licameli
7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli
384300016d Define FileDialogWrapper, with localized default prompt and name 2018-01-01 17:50:04 -05:00
Paul Licameli
e8b875ff81 Define AudacityMessageDialog wrapper around wxMessageDialog...
... Prohibiting use of the default caption which is unlocalized.  (But we
didn't use it in fact anywhere.)
2018-01-01 17:50:03 -05:00
Paul Licameli
ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli
2c2db0fe09 Implement drag-and-drop of Nyquist, LADSPA, VST plug-ins...
... I'm not sure how to make it work for AudioUnits, LV2, or Vamp, for which
the API for identifying a plug-in doesn't map straightforwardly to a file name.
2017-12-31 18:09:41 -05:00
James Crook
52e9763337 Fix multiple bugs in IsGoodInt and IsGoodInt64
Alerted to this buggy code by Darrell Walisser's comment:
"Whoops, the range on the 64-bit signed integer check is incorrect."

After these fixes,  I saw that IsGoodInt was being used to test a dotted
version number, so I commented out that (bogus) test which was previously
always succeeding.

The IsGood{num} functions did no range checking if the numbers were shorter
than the max value.  Then, if the number was similar in length, the first digit could
be an invalid character and the code also previously accepted all 9's followed by 1.

My new code would benefit from code review and unit tests.
2017-12-29 20:15:29 +00:00
James Crook
db45280695 Add names to some windows.
This is mainly for automation, so that when exploring the windows we have a name for
each.
2017-12-22 14:03:32 +00:00
James Crook
4da9e41e03 Bug 1799 - Un-muting with a single track unnecessarily activates the Solo button 2017-12-17 16:49:35 +00:00
Paul Licameli
4d978bcefb Use wxPrintf not printf 2017-12-16 11:54:32 -05:00
James Crook
f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00