... The first is an example of a Setting with a computed default value.
Also making a new file to hold them, separate from the GUI that changes them
in QualityPrefs; fewer things depend on QualityPrefs
... Giving many examples of use of Settings objects. Many other rewrites like
this should be made to eliminate as many direct uses of gPrefs as we can.
Don't rely on long distance coincidences of literals for paths or defaults.
For each of several paths like /AudioIO/Host, all uses of that path are replaced
with use of a global Settings object defined in one place, in AudioIOBase. The
object also gives the benefit of caching the last-read or written value.
Other users of those preferences must then include "AudioIOBase.h" to make the
dependency explicit at compile time.
It should be checked that no other mentions of those paths remain in the source,
and that there was no unintended change in default values.
This also inverts dependency of AudioIOBase on RecordingPrefs, which is GUI for
changing some of these settings.
... the intention being, that no string literal for a path, or its default
value, shall ever occur twice in the code, relying on long-distance coincidence
of literal values. Instead, a named Setting object is constructed once, then
read and written.
For now, the Tie... functions in ShuttleGuiBase will take references to
implicitly constructed temporary Setting objects. But all should later be
made static objects, and the constructors made explicit.
... Exhaustive examination convinces me that Set Labels and Set Envelope are
the only two needing this. (The special problems of Open Project merited a
different bug number 2764.)
... All is set up so that plug-in providers can be modules that register
their instance-creating function pointers directly with RegisterProvider; no
special symbol name needs to be exported.
That is, they now just need to export ModuleDispatch and GetVersionString, just
like other modules for other purposes.
Duplication of logic from ModuleManager::InitializeBuiltins() is removed.
No examples yet in the previous commits, but it does work in my misc-modules
branch.
... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.
Does this make scripts/graph.pl show a new dependency cycle? Happily no. But
now we know.
... It ended up not used, and long ago superseded by other TrackPanel
reorganization.
Such things as that (and many more) will be implemented with different
idioms (registries in various higher level code) without requiring changes in
this low level protocol for loading modules.
... Repeatedly pass through the list of modules that need to be opened, so
long as the list is not empty and at least one module loaded in the last pass.
This discovers dependencies of modules on other modules, avoiding the need to
describe the dependencies and make one pass in some topologically sorted order.
Which would be smarter, but would require much other work.
... ViewInfo should only be concerned with screen geometry.
(And so it won't depend on AudioIO (even higher level) after stream time moves
there.)
PlaybackScroller receives the timer event directly (not from ViewInfo) and
caches playback position instead. Then, as before, it propagates the event
to PlayIndicatorOverlay.
... Those for which the internal name and the user-visible English names differ,
or that needed disambiguating context for i18n, were always shown as English
in the menus.
Silence and Filter Curve were the only two examples. There are others.
... What they had in common was the use of the XC macro to specify a
disambiguating context string. Example: "Interface" page of preferences.
TranslatableString had not implemented this
correctly except in the less usual case of plurals.
... 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.
... 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.
... Because it depends on having visited various lib-src directories, which I
want to delay until visiting various of the modules, and I also want to visit
src before the modules, because that's bottom-up dependency ordering.
So the step should not be done in src.
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.
The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
... Logging data from the wild shows that the SELECT query in
ProjectFileIO::CheckVersion() returned SQLITE_BUSY sometimes.
A plausible explanation is that the concurrently starting checkpoint thread
was sometimes creating a new connection simultaneously.
Instead, serialize the creation of the two connections in the main thread and
pass the second one ready made into the checkpoint thread.
This will save the current log to the Audacity config directory and
a name of "lastlog.txt". This is for diagnosing errors that may
occur during Audacity exit.
This bug was caused by dither being applied to all float output,
and dither clips to +1/-1 to avoid high values, especially NaNs,
polluting audio downstream.
Dither was applied because of an incorrect fix for Bug 1572.
The 1572 fix assumed SF_FORMAT_PCM_24 was a (1 << N)
value, rather than from an enumeration. Hence a check
involving it requires a mask, which it now has.
Also fixed a bug with GetPreferences, where uninitialised pointers
could be used that were only meant for use when editing values
(in which path they would be initialised).
The option to force decimal point in numbers and not
use comma is an experiment to work around bug 2709
It's disabled, because wxWidgets checks for a mismatch
between locale and number format, and disallows it. To get
it working correctly might require patching wxWidgets.
This change does get the option string into our source code
so that translators can translate it.
The error message is now no longer vague, but 2720 can't be closed yet.
Audacity continues with a connection to an unusable project still open,
and then crashes later.
Bug 2673 was an important multi-threading issue, and so I added
comments about the code. Also a LogDebug to track cache use.
Bug 2673 was also a crash with no error message reported.
That is something to revisit later and deserved a comment.
It's believed that the underlying issue is fixed now.
The 'ANSWER-MEs' can be answered in 3.0.1.