- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
... 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.
Previously this was hard coded to use the online alphamanual.
Some other help-on-errors paths were hardcoded to use the online manual, and did not use local help even if available, so these were changed too.
Also two naming changes in the code:
ShowHelpDialog() became ShowHelp() because it typically shows the help in your browser, only showing the help in a dialog under certain circumstances.
The helpURL parameter became helpPage since it is usually a page name that is then elaborated into a url.
The Link() function became InnerLink().
Some careful http -> https changes made too.
Moved one ASSERT that was in the wrong place and added a new one. This might give a little more information in mac debug builds about Bug 1636 - (Mac) Equalization: Crash selecting the "RIAA" or "Telephone" curves. This is NOT a fix.
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.
It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change. No matter now.
... Strong, meaning that the file at the specified path is created or modified
only if all write operations complete without exceptions, barring one very
unlikely possibility that a final file rename fails, but even in that case the
output is successfully written to some path.
This commit does not add throws, but changes the type thrown to a subclass of
AudacityException, so that GuardedCall will cause the user to see an error
dialog in all cases.
Duplicated logic for making temporary files and backups is now all in one
place, the class XMLWriter.
There may be more new GuardedCalls than necessary -- the catch-all for the
event loop, AudacityApp::OnExceptionInMainLoop, might be trusted instead in
some cases -- but they are sufficient.
On windows the capitalisation does not matter.
On Mac/Windows we use 'audacity' in path names, even if the directories wxWidgets suggests have 'Audacity'.
The bug was that when the Equalization effect opens in Graphics mode, the sliders are set to zero, and don't do the right thing. This was caused by my incorrect fix for bug #1346.
Fix is to call UpdateGraphic to set the sliders up. Call to UpdateDraw also added, which includes the appropriate calls to Show, rather than have these in PopulateOrExchange.
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.
Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.
Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
... This makes much code agnostic about how other things (functions and
arguments) are typed.
Many of these neeed to become size_t instead of sampleCount.
I confirmed that the currently used real FFT code in RealFFTf.cpp is faster
than the old one with a quick benchmark that calls PowerSpectrum() on 4-minute
audio file, with different sizes of computation windows:
Window_size: 256 method: new FFT time_s: 0.393
Window_size: 256 method: old FFT time_s: 1.065
Window_size: 1024 method: new FFT time_s: 0.38
Window_size: 1024 method: old FFT time_s: 0.958
Window_size: 4096 method: new FFT time_s: 0.413
Window_size: 4096 method: old FFT time_s: 1.084
Window_size: 16384 method: new FFT time_s: 0.518
Window_size: 16384 method: old FFT time_s: 1.338
Window_size: 65536 method: new FFT time_s: 0.655
Window_size: 65536 method: old FFT time_s: 1.524
Window_size: 262144 method: new FFT time_s: 0.735
Window_size: 262144 method: old FFT time_s: 1.873
... the preference is independent of those in Interface and Recording
preferences, which affect meters, sound activated recordings, time track,
and Plot Spectrum
... and SelectedRegion, and not ViewInfo or zoom level as a double.
Also some leftOffset arguments.
Assumptions of uniform zoom level persist in TrackArtist::DrawClipSpectrum and
in TrackArtist::DrawClipWaveform but no longer in the rest.
Non-linear effects now process tracks before mixing.
This will be slower when multiple tracks are selected
but the preview should now match the applied effect.
SetLinearEffectFlag(true) allows linear effects to
preview more quickly when multiple tracks selected, by
pre-mixing selected tracks.
Simple generators like Tone and Noise may be marked as
'linear' so that they only preview a few seconds.
Generators that vary over time (such as Chirp) must use
the full duration that is set. As this currently
requires calculating the full duration, preview for
'non-linear' generators are not limited to the preview
length.
As this is a reversal of change committed in 2007 with no real
explanation or history behind that change other than it was
done for Export, we should probably give exporting a bit of a
workout.
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects. All effects now share
a common UI.
This gives all effects (though not implemented for all):
User and factory preset capability
Preset import/export capability
Shared or private configuration options
Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.
It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect. Keep
a sharp eye (or two) open.
Fix a typo in the name of 'Classic Filters'.
Improve consistency layout as we switch filter types.
Remove a win warning in EQ.
Improve some code readability / change styles (please don't shoot me for that!). OK, possibly increased the inconsistency.
* Fix memory leaks.
* Add comments about initializations and checking for successful results.
* Add checks for NULL deref.
* Consistency in "TODO" vs "TO-DO" comments!
EQDefaultCurves.xml should be in
* Unix: prefix/share/appinfo
* Windows: the directory where the executable file is located
* Mac: appinfo.app/Contents/Resources bundle subdirectory
according to http://docs.wxwidgets.org/trunk/classwx_standard_paths.html#5514bf6288ee9f5a0acaf065762ad95d
I'm guessing that people making those releases should know what that means. The Win one is already sorted.
When looking for default curves, EQDefaultCurves.xml is searched for in the DataDir first, then the exeDir, then the error dialog is popped up.
Error dialog stays open while user visits web site to get EQDefaultCurves.xml.
The 'normal' set of curves EQCurves.xml is still in DataDir.
Remove double-click to rename, for keyboard users.
Added 'Names' to controls in the hope that screen readers will be helped.
Resizing works better.
Various tidy-up, inc. adding a few comments!