Commit Graph

30 Commits

Author SHA1 Message Date
Paul Licameli
b8c0125143 Replace comparisons against wxEmptyString with empty() 2019-03-14 16:20:18 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -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
29ec921c8b Revert parts of e1b6091 involving effects, for .cfg file compatibility 2018-07-05 09:57:17 -04:00
James Crook
20178b15e1 Fix some 'declaration hides' warnings.
We were for example getting many of these:
\audacity\src\widgets\numerictextctrl.h(171): warning C4458: declaration of 'value' hides class member

MSVC2013 didn't warn about these, but MSVC2017 does.
2018-06-27 12:36:13 +01:00
Paul Licameli
b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli
e1b60916b7 More consistent naming conventions for choice control items...
... This commit leaves at least a comment for all choice controls of all
built-in effects and commands.

Use CamelCase with no spaces for the internal identifiers, given in
wxT("...")

Use more idiomatic English with spaces in the user-visible names, given in
XO("..."); these strings go to the message catalog for internationalization

Do not use underscores

In case these strings are the same, give it just once in XO("..."), but if in
a future version it is decided to change the name in XO("..."), then the
original should be kept also in a distinct wxT("...") string, so that
saved configuration or plugin settings or macro files don't become gratuitously
incompatible just because of that user-visible name change.

Left TruncateSilence alone for now -- I think that choice demands a rewrite
as a slider instead.
2018-03-27 15:57:48 -04:00
Paul Licameli
2065eebff6 IdentInterfaceSymbol to distinguish internal vs visible enum settings 2018-03-27 07:51:44 -04:00
Paul Licameli
595cf05d42 More uses if LocalizedStrings 2018-03-27 07:51:44 -04:00
Paul Licameli
81dd580c57 Pass array and count separately to read/write/define enum 2018-03-27 07:51:43 -04:00
James Crook
0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -05:00
James Crook
1d9477a455 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-24 14:20:24 -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
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -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
80a958f8a4 Rewrite empty prompts to ShuttleGUI functions as {} ...
... so we might more easily redefine the type of the function argument,
some other day (not this release)
2018-01-01 22:51:25 -05: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
Paul Licameli
c94222ff54 Fix missed translations in Distortion effect after language change 2017-09-29 17:17:39 -04:00
Steve Daulton
e7a9c37745 Add help buttons for normal built-in effects 2017-05-20 14:49:07 +01:00
James Crook
389b0f197e Improve source for xgettext
1: Mark % as not being treated as print formatting.
2: i18n hint fix.
2016-11-21 10:31:52 +00:00
Paul Licameli
412e4955af Put braces around sub-object initializers 2016-09-19 11:47:47 -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
James Crook
65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
Paul Licameli
67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -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
Steve Daulton
8f016b0c1c Increase latency in Distortion effect
to reduce skipping, which has been reported with some
settings on Windows.
2016-07-25 13:18:52 +01:00
Steve Daulton
5412eab040 Distortion presets for remainder of 'Types' 2016-07-18 12:06:42 +01:00
Steve Daulton
7c8d8b64d3 Distortion effect, 'Hard Clip' to 'Hard Clipping' 2016-07-01 11:27:23 +01:00
Paul Licameli
b0c66ff5e2 fix mac build 2016-06-15 08:05:30 -04:00
Steve Daulton
27e46d5331 Distortion effect added 2016-06-15 10:51:46 +01:00