Several of the dialog were missing acccess keys.
Note: access keys not added to Distortion effect as yet, due to complexity of control names changing when the Distortion type is changed.
... Wrong results could happen in effects that don't compute the channels
independently, such as the built-in Reverb.
To fix it, always fetch same position of left & right channels when
computing effects.
This removes the ability to import/export multiple presets at
once and add the standard method used by the other plug-ings.
It also adds a workaround for the AU view not updating after
setting a new preset. I will continue to look for the true
cause of this, but the workaround does correct the display
issue.
... without making undesirable dependency cycles.
Eliminate calls to NewWaveTrack in effects, but in Edit>Copy too, which was
not mentioned in the bug report. (Copying a track, deselecting all, and pasting
preserved CLIP colors, but not the TRACK color setting which applies to newly
generated clips.)
Instead, always use the new function WaveTrack::EmptyCopy from the track to be
later replaced, getting color information.
NewWaveTrack is still used in benchmark test, import, the Track menu
commands that make new tracks, recording to new tracks, and generators without
a selection, where there is no track to copy from.
Also when deserializing tracks from the .aup file, in which case the saved
color is later retrieved from the file.
Also, in mix-and-render, where other logic decides whether to copy colors
afterward.
See commit a9658e6ef7
Nearly all of the entire preset handling was broken. It was based
on the parameter names only and for various reasons, that was very
inadequate.
So, it now uses the recommended approach.
EffectChangePitch:: Don't use the inputTracks() when building the GUI
in Batch mode.
Repeat and NyquistEffect had the same problem as they could call
FindProject() which used inputTracks() on a closed project. Fixed by a change in Effect::GetSelectionFormat().
... Force you to pass bool now. Break compilation in case you pass literal
"false", rather than implicitly converting it to bool true !
See commit 7766d9a192 which was in 2.3.2
But Max merged later at d9608cddea in 2.4.0, with
his effect apparently written analogously with the old code in Normalize from
before that, and this quetly compiled with the wrong effects.
... or, what I saw in my Mac builds: there wasn't a hang, but there was
incorrect behavior on alternate attempts to export presets. Sometimes, instead
of (correctly) giving a file overwrite warning, there was instead a message
box about failure to open a non-existent file path, which had the last path
component duplicated.
Problem:
Screen readers don't automatically read the units of the values in text boxes.
Fix:
Add units the the accessibility name of the text boxes.
Thanks to Paul for providing ShuttleGui::NameSuffix(), which makes the code neat and readable.
Big Thanks to Steve for finding this and writing clear steps to reproduce when logging this bug in Bugzilla. Also thanks to Peter for confirming the same bug is present on Windows, i.e. is all platforms, not just Linux.
This is a minimal fix for this bug, and can be improved on in time. There is almost no error checking in the file read and write, so if you use a bad presets file, you won't be told (yet).
It does provide import and export for all effects that have presets.
Problem:
Validation of the length fails, because what should be the min and max are in fact the max and min.
Introduced by commit 1d32824, which got the min and max the wrong way round.
Nyquist has a limit (less than 2000) for the number of arguments
which may be exceeded when creating the *track* clips property.
In the event that there are more than 1000 clips in a track,
Audacity will now only add the first 1000 clips to the *track* property
and add NIL as the 1001th.
... removing link dependencies on them from src/menus, so they are now suitable
for moving out into modules.
They are:
Mixer Board
Karaoke (also called Lyrics)
History
Contrast
Plot Spectrum
Their header files are now no longer included anywhere but in their own
implementation files!
These are ancient and "configunix.h" was being pulled in
via Types.h. Nothing major, but they were generated for
a 32-bit system and "may" cause problems when used on
64-bit systems.
(That's unlikely though since they haven't all this time.)
... Problem with static initialization order of ReservedCommandFlags, caused
wrong enablement of menu items (at least on Mac), such as Plot Spectrum or
Contrast enabled when there was no selection
* Calculate loudness for short or silent selections as well.
In case of selections shorter than 400ms (one momentary loudness block),
take what we have got and divide only be the actual length.
Abort loudness normalization silently if the selected audio is all
silent.
* Fix loudness effect bug when selection includes a gap.
If the selected audio in a track contained a gap between two clips,
an incorrect amount of samples was processed.
... consistently with the drop-down menu, and now the Tracks Preferences too.
Only distinguish Waveform and Spectrogram and nil.
See also commit e3d9fd9.
... you use the prompt, and you enter a complete script with control comments
that are reinterpreted to put up a second dialog.
This simplifies Effect::Delegate() and avoids mutual recursion of ShowInterface
with DoEffect.
... and Track::GetOwner() is publicized, so that now you can find the
the AudacityProject, if any, that owns a given Track; this will help eliminate
some uses of GetActiveProject
... This changes visible behavior.
If a realtime effect was open (say, AUGraphicEQ on Mac), and there were multiple
projects, then the window was associated with one of the projects.
But the "Apply" button could apply the effect to the active project, even if
that was not the associated one. But the associated project was queried for
the existence of a selection.
Now, EffectUIHost::OnApply consistently examines and changes only the associated
project, even if it is not active.
You have to close the window and reopen it with the other project if you really
want to change the other.
You can't have two realtime effects open at once, even if for different
projects. To overcome that limitation, we would have to make
RealtimeEffectsManager store state per-project, not globally.
... by passing parent as reference, not pointer, and testing in the dialog
factory function.
This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
... We need to un-correct the smart quote characters back to dumb quotes
before passing the input to the Lisp interpreter.
The smart quote correction is a consequence of the move to the MacOS 10.9 SDK.
Stopping the correction at the source would require objective-C hacks in a
custom build of wxWidgets, and just not worth the effort.
This fix only corrects the text input at one wxTextCtrl. Should we reexamine
other uses of that class?
... When locale is not English (and translation is complete enough, as in
French) then the switching from Generic to Full interface in Options... did not
work.
(Locales lacking translations of the strings "Full" and "Generic" didn't have
this problem.)
(AudioUnit effects still don't implement a "Basic" interface distinct from
"Generic" regardless of locale. That's another matter.)
... in cases of "TranslatableString" that are not really translated.
This makes it easier to scan the code for such unusual constructions of
TranslatableString, distinct from mere mentions of the TranslatableString type.
... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change). This allows TranslatableString with arguments to be constructed
at static initialization time.
There is also a special "verbatim" or null context which makes no translations
of msgids.
There is not yet any use of other contexts besides default or null.
... include it in the msgid intead, to get appropriate translations. For
instance some locales use the same character but prefer to insert a space
before it.
... And corrected improper connections in HistoryWindow and ContrastDialog,
improper because they got called with the wrong this pointer, to
the control instead of the dialog. But that was harmless anyway because the
handlers did not use this.
... Trying to reduce that just to chained calls on S, or conditional and looping
logic for variations in layout.
Lift some declarations to higher scope; or use expressions that avoid local
variables; or even use lambdas for more complicated computation of arguments
for the member functions of S.