Commit Graph

34 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
Paul Licameli fbfccf1393 Delete or un-inline some constructors, assignments, others...
... Which will be needed for various reasons for Windows builds of certain
modularizations, which will otherwise complain that they can no longer
generate them as inlines.

In one case, deleted copies require explicitly defaulted moves, but they will
work as generated inline.
2021-05-10 10:46:55 -04: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
Paul Licameli eb038972b0 Remove unused function and data member 2020-05-28 11:23:09 -04:00
Leland Lucius ff20948d57 Bug 2229 - Audacity may fail to load a "bad" module silently, with no error message 2020-03-29 15:33:23 -05:00
Paul Licameli 571f42df79 Add some comments 2020-02-20 08:51:39 -05:00
Paul Licameli 56cd24a062 Rewrite insertion of menu items by null and Nyquist modules...
... using the new registration system, and without the fragile hacks making
assumptions about the positions of menus within the menu bar.
2020-01-30 15:09:30 -05:00
Paul Licameli 1537930195 DiscoverPluginsAtPath reports error as TranslatableString 2019-12-20 22:06:18 -05:00
Paul Licameli 5be54c5612 ModuleManager::CreateProviderInstance returns more specific type 2019-05-16 12:30:26 -04:00
Paul Licameli de60edc62f Remove wx/{app,statbmp,spinctrl,scrolbar,dynlib,dcmemory}.h from *.h 2019-03-30 07:57:37 -04:00
Paul Licameli 40b4361732 Remove wx/arrstr.h from headers 2019-03-26 12:41:44 -04:00
Paul Licameli 71036bed01 Remove PluginManager.h from other headers 2019-03-17 15:05:19 -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 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 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 a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04: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 0f8bd45a7c ModuleInterface::RegisterPlugin can report an error message 2017-12-27 15:19:36 -05:00
Steve Daulton 1dd6b848c2 Enable Help button for Nyquist effects 2017-05-20 14:49:07 +01: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 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 29349fedbb Loaded modules managed by smart pointers 2016-04-06 16:06:31 -04:00
Paul Licameli e0476b5e71 Module interfaces managed by smart pointers 2016-04-06 16:06:30 -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
lllucius@gmail.com e73b7e70a3 Fix for bug #857
Even though this is only a P2, I felt it would be
quite bothersome for the users and might cause some
confusion.

The problem was the the wxLocale was being deleted
before all usage of it was complete.  The fix was
to explicitly delete the plugin and module managers.
2015-02-12 02:30:30 +00:00
lllucius 10f62cdae5 Fix for bug #833
This allows duplicate items in the effects menus and provides a
means to uniquely identify each item.
2015-01-19 16:28:48 +00:00
lllucius 41083f74cc Another round of effects bashing.
I've added some of the new plugin stuff to LV2, Nyquist, and
Vamp so that they play better in the new system.  They no
longer get bunched in with the Audacity effects when sorting
or grouping the menus.  They have not been fully converted
but they should be good for 2.1.0.

Nyquist plugins now include ";author" and ";copyright"
statements.

Added the 4 new Nyquist plugins to the Windows build.

Audiounits are still coming...had to push them to the back
burner to get this other stuff out of the way.

Scanning for new plugins has been improved so that newly
discovered ones will be shown to the user when Audacity starts.

Effects menu sorting has been fixed and improved.

Disabling effect types in Preferences works again and you
no longer have to restart Audacity for them the change to work.

Effect usage in chains works again.

Plugin registration dialog code simplified a bit.

Group names in the pluginregistry are now base64 encoded.  I
never really thought about it, but wxFileConfig group names
are case insensitive and since I was using the group name as
the plugin ID, I ran into a conflict on Linux where there
were two plugins with the same name, just different case.  (And
they were different plugins.)  Hoping all of this will change
when/if the config file gets converted to XML.  (wx3 if finally
including XML support)

A fair amount of cleanup of this new code has been done and
will continue as more stuff is converted.
2014-11-19 06:58:44 +00:00
lllucius ad92e8c4bf One more round of effects changes.
The big thing is the common efffects UI.  Right now Ladspa and VST
have been converted to use it and Audiounits will be next.  It makes
everything nice and consistent while reducing the clutter in the
dialog.

Other goodies are:

Ladspa effects now show output controls when supplied by the effect
Ladspa effects now work fine as Analyze type effects
Ladspa now has user presets
VST effects dialog is now less cluttered...leaving more room for the effect
Ladspa and VST effects now share a common UI
Ladspa and VST effects are now usable in chains
Ladspa and VST effects now handle user presets the same way
Currently active effects settings automatically saved and reloaded
Can now do numeric range checking on input fields.

And, as always, plenty of critter squashing.
2014-11-14 03:03:17 +00:00
lllucius 96d108f5d5 Add missing include 2014-10-26 18:56:42 +00:00
lllucius 1eeb4d979a The fabled realtime effects...
I've made it where you can enable and disable via experimentals:

EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK

You will notice that, as of now, the only effects currently set up for
realtime are VSTs.  Now that this is in, I will start converting the
rest.

As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects.  This isolates the effects from changes in Audacity and makes
it much easier to add new ones.

Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too.  There are quite a few VSTs for Linux if
you search for them.

The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me.  I'm not really sure it should
stay in as-is.  I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects.  It should probably
revert back to that idea.

You may notice that this DOES include the API work I did.  The realtime effects
were too tied to it and I didn't want to redo the whole thing.  As I mentioned
elsewhere, the API stuff may or may not be very future proof.

So, let the critter complaints commence.  I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly.  ;-))
2014-10-26 03:24:10 +00:00