Commit Graph

58 Commits

Author SHA1 Message Date
Paul Licameli cfbdd2d22e Type alias ManualPageID for wxString used in many places...
... eliminating many direct mentions of wxString.  A real type distinction will
be made next.
2021-07-01 13:33:04 -04:00
Paul Licameli f369b5109b Change almost all uses of WaveTrack::Get() to GetFloats() ...
... A call graph browser easily shows that the extra generality of fetching
samples in some other format is only used in Benchmark -- where the format is
always the same as what the track is constructed with.

This makes re-verification of the claims in comments two commits ago easier.
2021-05-27 11:38:10 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli 4d09705a73 Change XO to XXO in many more places, with no effects at all...
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.

This commit makes ONLY such changes, and comments in Internat.h.  It is big
but quite harmless.

The intention is to introduce a type distinction in a later release, by defining
XXO differently.  XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
2020-05-22 13:07:50 -04:00
David Bailes 203d801293 Built-in Generate and Analyse dialogs: add missing access keys 2020-03-27 14:40:26 +00:00
Paul Licameli 69dab8b552 Each built-in effect class registers itself with BuiltinEffectsModule 2020-01-19 19:16:51 -05:00
Paul Licameli 4579835911 Eliminate one of the ## macro hacks in LoadEffects 2020-01-19 19:16:51 -05:00
Paul Licameli 2570b56176 Rename Maybe and its members more like std::optional of C++17 2020-01-19 11:38:12 -05:00
Paul Licameli 5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli d8c2610d88 TranslatableString in AudacityCommand::MessageBox, Effect::MessageBox 2019-12-20 21:32:47 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli 1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli aa5f9550bd LabelTrackView, not LabelTrack, handles focus changes when adding 2019-06-20 10:47:25 -04:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli 6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli 3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
James Crook 466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
Paul Licameli 2e11844f6a Effect::inputTracks() now gives only const access 2018-10-01 10:59:48 -04:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
James Crook 0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -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
Paul Licameli 52a7f2320d Re-fix some warnings about mixing signed and unsigned better...
... Assuming that large unsigned magnitudes with high order bit set are not
the problem, but signed negatives of small magnitude may be:

1) Always cast the unsigned to signed in comparisons, not the other way.

Also:

2) Cast unsigned TERM to signed by itself, before subtracting.  Don't cast
the result.

3) Rewrite some comparisons by moving subtracted term to other side.

See commits
d2fe7b1757
f463eda36c
2018-01-23 18:51:53 -05:00
Paul Licameli 8a074770e8 IdentInterface::GetDescription() returns a translated string...
... See commit 3b90538b84 which removed the
only use of the untranslated strings.

Also follows better i18n guidelines for composing the VSTEffect description.
2018-01-07 21:16:26 -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 378c96fda1 Consistently use translated effect name in titles of message boxes...
... For built-in and Nyquist effects.
2018-01-01 17:50:01 -05:00
James Crook 63de7f0884 Bug 305 - Analysis effects produce false indication that a label is open for editing
This was true of any Nyquist or VAMP effect that created labels.
2017-12-17 21:18:07 +00: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
Paul Licameli d3b1ae512b Effect param keys don't need to localize; audacity.pot can shrink...
... The keys are only ever used as internal identifiers in wxConfigFile
objects.  So they are often space-less and camel-cased.

I have noticed a couple instances of translators confused by these.
2017-11-05 11:48:15 -05:00
Steve Daulton e7a9c37745 Add help buttons for normal built-in effects 2017-05-20 14:49:07 +01:00
Paul Licameli 6ca89c28ff Remove naked new[] in: builtin effects 2017-03-17 17:52:49 -04:00
Paul Licameli 004df48438 Make Effect::mTracks private 2017-03-17 17:52:25 -04:00
Paul Licameli 5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Paul Licameli ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli 78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
James Crook 65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
Paul Licameli 38ee7c0e3e Bug 1501 again: don't crash for extreme Start values for FindClipping 2016-08-28 15:53:51 -04:00
Paul Licameli fd2b050d6f Type agnosticism for some other variables that were not sampleCount...
... in some cases, this fixes narrowings.
2016-08-24 14:50:45 -04:00
Paul Licameli 79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli 1281f1b14b Common function limits buffer size to sampleCount known to be small 2016-08-23 12:46:10 -04:00
Gale Andrews b7aabee96a Bug 1317 Further consistency fix for description
Don't start description with an object, per consistency with Manual.
2016-04-07 03:35:01 +01:00
Leland Lucius 9dc9348127 Fixes bug #1344 (mac build)
In addition, the Xcode project can now build against the 10.6
or 10.7 SDKs.  All that is needed is to change the SDK version
and the other settings will change automatically.
2016-03-07 00:29:26 -06:00
Paul Licameli 0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -05:00
Paul Licameli 0094c4f465 Bug1348, partial: Fix bad undo after cancelling Vamp or FindClipping analyzer 2016-02-27 18:12:36 -05:00
Steve Daulton 5c2fc5ff7d Fix bug 1317 2016-01-27 13:38:21 +00:00
Paul Licameli f55e9f39b3 travis 2015-07-28 10:48:21 -04:00
Paul Licameli 51d7b3670c Remove LabelTrack.h from other headers 2015-07-28 10:02:07 -04:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Leland Lucius 7a0aa43a82 Convert all wxTRANSLATE() to XO()
XO() can be used anywhere a string must be extracted for translation
but not automatically translated at runtime.
2015-04-18 23:03:49 -05:00
Leland Lucius 8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00