Commit Graph

147 Commits

Author SHA1 Message Date
Paul Licameli cd9e4e3987 RealtimeEffectState into RealtimeEffectManager...
... which doesn't need Effect.h then.

Freeing Effect and RealtimeEffectManager from cycles, leaving 25 in the big
s.c.c.
2019-06-24 01:04:03 -04:00
Paul Licameli 5caeaf520b RealtimeEffectState needs only EffectClientInterface, not Effect 2019-06-24 00:49:14 -04:00
Paul Licameli 867e6a8d9e Move fields out of Effect, into new class RealtimeEffectState...
... and simplify, using a std::atomic instead of a critical section.

(But did this before, and does this now, correctly synchronize across threads?
I defer that question.)
2019-06-24 00:49:14 -04:00
Paul Licameli 0f62046313 Define EffectClientInterface::GetBlockSize() 2019-06-24 00:49:14 -04:00
Paul Licameli dee27e052f Free Nyquist.cpp from cycles...
... Very easily, just by demoting two macros from Nyquist.h to Effect.h.

The graph improvement is worth this bit of preprocessor namespace pollution.
2019-06-23 23:20:03 -04:00
Paul Licameli 87a9f34c22 ScreenshotCommand uses hooks in AudacityCommand and Effect dialogs...
... so that they don't have a static linkage dependency on it, and that frees
it from dependency cycles, to a high level
2019-05-18 20:31:17 -04:00
Paul Licameli 548192fcf3 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:58:34 -04:00
Paul Licameli 56f51d8176 Revert "Remove redundant #include-s from .h files..."
This reverts commit b7fe62d170.
2019-05-16 14:33:55 -04:00
Paul Licameli b7fe62d170 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:15:05 -04:00
Paul Licameli fe1be2b6a8 Revert "2096: Windows & Mac high quality Change Pitch/Tempo preview"
This reverts commit fe22b2ae22.
2019-04-20 12:37:22 -04:00
David Bailes fe22b2ae22 2096: Windows & Mac high quality Change Pitch/Tempo preview
Problem:
Preview plays the original, and removes the selection.
This appears to have been caused by the commit: 0aad028

Fix: revert that commit. Note that in the #ifdef EXPERIMENTAL_SPECTRAL_EDITING code has not been reinstated.
I have not looked at why the commit caused the problem, just reverted it.
2019-04-17 10:48:56 +01:00
Paul Licameli 0b733eed3f Remove (or comment) ProgressDialog.h in headers...
... For ImportPlugin, use unique_ptr not Maybe to hold it, and take constructors
out-of-line.
2019-04-04 09:47:57 -04:00
Paul Licameli c982cf6a41 Remove wx/intl.h, wx/brush.h, wx/bitmap.h from headers 2019-03-30 11:45:20 -04:00
Paul Licameli 4e9c3cfb5f Remove wx/{dc,tokenzr,tglbtn,statusbr,simplebook}.h from *.h 2019-03-29 06:29:35 -04:00
Paul Licameli 70e88782fe Remove wx/{grid,font,ffile,colour,button,bmpbuttn}.h from headers 2019-03-28 12:27:10 -04:00
Paul Licameli c3aad2e026 Remove wx/event.h from headers 2019-03-27 04:36:51 -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 906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli 173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli 3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
Paul Licameli a0aa69a248 All tracks allocated with make_shared, no more make_unique...
... so that we can use Track::SharedPointer without undefined behavior even on
tracks that don't yet belong to any TrackList.

Also fix the return type of function template TrackList::Add and remove some
casts.
2019-03-16 13:11:33 -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 135c2a71ce Replace "" and wxEmptyString with {} in default argument values 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
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 bb3aa00f50 Effect::CopyInputTracks was only called with two values...
So now it simply takes a bool.
2018-10-01 11:06:31 -04:00
Paul Licameli 2e11844f6a Effect::inputTracks() now gives only const access 2018-10-01 10:59:48 -04:00
Paul Licameli 6930b63192 Redo track kind as an enum class defined at global scope 2018-09-29 21:41:47 -04:00
James Crook b975956812 Add re-entrancy checks to Nyquist
These changes below are paving the way for aud-do:

Nyquist Effect now detects self reentrancy and skips reentry if so.
Nyquist Effect now detects if another effect has run during effect processing, and does not send Nyquist
output if so.

Neither of these preparatory changes have an effect in absence of AUD-DO (or other function
that allows Nyquist effect to call out to Audacity functions).
2018-08-01 20:31:03 +01:00
Max Maisel d707f68189 Expose "msg" parameter in Effect::TotalProgress(). 2018-07-24 17:10:52 +02:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli 0394660e9e Use IdentInterfaceSymbol for vendor strings, which are used in paths 2018-04-11 11:13:41 -04:00
Paul Licameli 2c19e8f81e Use IdentInterfaceSymbol to identify effect families 2018-04-11 11:13:40 -04:00
Paul Licameli 0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
Paul Licameli 81dd580c57 Pass array and count separately to read/write/define enum 2018-03-27 07:51:43 -04:00
Henric Jungheim d8da4015ef Make it possible to const'ify xpm. 2018-03-27 05:36:02 -04:00
Paul Licameli 170f92c181 A means to specify legacy values of effect choice controls...
... For Truncate Silence only now, perhaps it will find more future use
2018-03-26 14:26:30 -04:00
andheh b71c24f15f fixed a "used uninitialized" warning in src/effects/Amplify.cpp 2018-03-06 21:29:53 +00: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 942175f27b Comments which IdentInterface functions return persistent values 2018-02-21 21:43:03 -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 8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -05:00
Paul Licameli 080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli 0aad028c9b Simplify calls to Effect::Delegate 2018-02-21 19:20:53 -05:00
Paul Licameli 4628d6afa7 Remap effect type from "Audacity" to "Built-in", carefully...
... doing that only for the user-visible string, seen in the Manage>About menu
of the effect dialog and in the sorted or grouped Effect/Generate/Analyze
menus.

But don't for the string used internally and written into pluginregistry.cfg,
so that compatibility of that file is preserved.

See also commits cafbff9ff8 and
c6bbe4c3da
2018-01-16 11:11:36 -05:00
Paul Licameli 31231a54d2 use override 2017-11-05 21:01:52 -05:00
Paul Licameli 5f298accbd Translated effect name and description in many places in Effect.cpp...
... including titles of dialogs,
messages,
About sub-menu of the Manage button,
long-form names of Undo items (in history view),
message for why command is not allowed when there is no selection

Also one place in Effect Rack code but it's commented out
2017-09-10 19:21:35 -04:00