Commit Graph

66 Commits

Author SHA1 Message Date
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Leland Lucius 21296b0cf1 New wrapper for wxFileConfig to fix several bugs
Bug 2135 - Audacity crashes if launched with a locked pluginregistry.cfg file
Bug 2651 - If pluginregistry.cfg gets locked while Audacity is active the Plug-in Manager is blocked - with no help
Bug 2650 - Virgin launch fails with no pluginregistry.cfg file created
Bug 1264 - Writing to locked audacity.cfg not reported to user
Bug 2649 - Launching Audacity with a locked audacity.cfg file gives not one but three error messages - and no help
Bug 2652 - User is not warned if they launch Audacity with a locked pluginsettings.cfg file
2021-01-31 04:24:35 -06:00
Paul Licameli 9360359e9d
Module manager (#549)
* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
2020-05-29 10:48:52 -05:00
Yuri Chornoivan d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli d32d464471 Uses of TranslatableString in src/import 2019-12-14 01:48:15 -05:00
Paul Licameli 626539d7a6 Remove Importer file description from PluginDescriptor...
... it was not used for anything but to write to config and read it again, and
it was improperly writing translated string values to the config file.
2019-12-14 01:24:42 -05:00
Paul Licameli 82e3ec6818 Don't duplicate registry path calculation in PluginManager.cpp 2019-11-26 11:02:35 -05:00
Paul Licameli 08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -04:00
Paul Licameli 40b4361732 Remove wx/arrstr.h from headers 2019-03-26 12:41:44 -04:00
Paul Licameli 1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli 485b6bb425 Use type aliases FileExtension, FileExtensions...
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
2019-03-15 15:18:11 -04:00
Paul Licameli df6a2cf479 Use type aliases RegistryPath, RegistryPaths...
... for wxString and vector thereof, holding strings that key into wxConfigBase;
to be replaced later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli dcd211affa Use type aliases PluginPath, PluginPaths...
... for wxString and vector thereof, when holding plugin paths (which may or
may not be interpreted as file paths, depending on the module); to be replaced
later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli cc92c7605e Rename typedef PluginIDList to PluginIDs 2019-03-14 17:15:41 -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 11d217076a Remove PluginManager::GetTranslatedVendor()...
... Instead, use the IdentInterfaceSymbol for vendor reported by the effect
2018-04-11 11:13:41 -04:00
Paul Licameli e3c54a769e Use IdentInterfaceSymbol in PluginDescriptor 2018-04-11 11:13:40 -04:00
James Crook 8ebf502cd6 Cleaner class hierarchy 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 942175f27b Comments which IdentInterface functions return persistent values 2018-02-21 21:43:03 -05:00
Paul Licameli 575070e9ae Remove PluginDescriptor::GetTranslatedEffectFamily...
... and instead look it up by ID, and find the effect's family name

Simplifying what was done at 4628d6afa7
2018-02-21 21:43:02 -05:00
Paul Licameli 097764d94c Distinguish Effect Family Id from Effect Family Name...
... and the distinction makes a difference only for built-in effects.

"Id" is meant to persist in pluginregistry.cfg, and is constrained by how
previous versions of Audacity were written.

"Name" is not persistent, so we have the liberty to change it, as done here
for the built-ins.
2018-02-21 21:43:01 -05:00
Paul Licameli 080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli bfbc218a5b comments 2018-01-09 14:57:54 -05:00
Paul Licameli cb403954fa Use std::[tr1::]unordered_(set|map), not the wxWidgets container macros 2018-01-08 18:22:51 -05:00
Paul Licameli cafbff9ff8 Separate plugin accessors for translated and unstranslated strings...
... because I want to make a type distinction later.

Replace calls to GetXXX() without argument, with GetTranslatedXXX() --
this reveals a subtle error, see next commit.
2018-01-05 18:30:35 -05:00
Paul Licameli 91b0e82c11 PluginDescriptor versions are in fact untranslated; make that clear...
... though the version (like the description) really wasn't yet used for
anything but to write and read again from the registry, still keep writing it.

Because it is appropriate to write untranslated strings to the registry, and
perhaps the values in old registries really will find a future use.
2018-01-05 18:24:22 -05:00
Paul Licameli 3b90538b84 Remove description from PluginDescriptor...
... it was simply written to registry and read again, serving no other
purpose.

But still write a blank to registry for backwards compatibility of the .cfg
file.

This makes it irrelevant whether the value of IdentInterface::GetDescription()
ought to be localized (registry values should probably not be).

Therefore IdentInterface::GetDescription can return localized, and it's all
right that the return be computed (as in VST effects), rather than
an unlocalized msgid that we rely on as an internal identifier.
2018-01-05 18:24:10 -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 e4260e9581 Bug 1587 - Mac: Ghost duplicate Nyquist effects after upgrade
Fix removes ghost Nyquist effects from the effects menu and generators from generate menu.
2017-02-05 20:27:56 +00:00
Paul Licameli 49e699b1df Remove overloads for sampleCount from ConfigInterface...
... The value was always cast to int anyway when writing, and it was used
only for one value in VST effect, which did not need 64 bits
2016-08-21 09:11:44 -04:00
Paul Licameli 942c62b6f6 Remove some naked new amd delete in: various 2016-08-08 07:51:24 -04:00
Paul Licameli df5fcc3581 Make static "Destroy" methods for certain singletons unnecessary. 2016-04-06 16:24:46 -04:00
Paul Licameli a9afad17ca Plugin instances managed without naked new and delete 2016-04-06 16:06:27 -04:00
Paul Licameli 990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli 7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli 9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Leland Lucius 7d3c055200 Fix for bug #1017 2015-06-09 00:39:25 -05:00
Leland Lucius 60f4ae1941 Fixing some i18n issues with the plugin settings file 2015-06-05 18:56:24 -05:00
Leland Lucius 0ef7ccb1d1 Fix permissions...not sure why this was happening though 2015-05-29 19:49:28 -05:00
Leland Lucius b8ce7f6125 Fix for bug #981 2015-05-28 09:57:59 -05:00
Leland Lucius 8a4424a1ae Try to get the plugin manager to, well, work...
It "should" work correctly now.  And you "should" be able to
switch between 2.1.0 and 2.1.1 without effects being detected
as new each time.
2015-05-26 00:26:43 -05:00
Leland Lucius f9061e3916 Let's try Effect management once more
As usual, I started out intending to do as little as possible
to this to get it working and wound up going overboard.

However, I believe it does allow easy management of the effects
and this will provide a basis for the full blown plugin manager
dialog.
2015-05-22 10:15:47 -05:00
Leland Lucius a5fb181c58 Do not save translated strings to the plugin registry
This was causing problems in the menus when switching
languanges.
2015-05-16 02:12:34 -05:00
James Crook 1e6e251ea9 Fix: Effects that aren't in menus now addable.
Previous code changes meant that they never got added in.
2015-05-15 22:20:06 +01:00
James Crook c85bf1c531 StereoToMono now EffectTypeHidden
This way it does not appear in the list of effects available to choose.
2015-05-14 22:15:44 +01:00
James Crook 8ae6fc42e1 Added 'More...' to Generate and Analyze menus 2015-05-14 16:11:46 +01:00
Leland Lucius 186cdb1248 Make sure "default" builtin effects are always registered
This appears to be a little overboard, but it makes the
registration of defaults a little more generic.
2015-05-12 10:41:22 -05:00