... 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.
... 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.
This will fix the clipping indicator turning on after a toolbar reset
and, as a bonus, the timers now only run if playing, capturing, or
monitoring. Will (slightly) reduce the CPU consumption.
Many other changes including:
1) Independent preferences
2) Automatic layout separated from vertical/horizontal orientation choices
3) Combined menu and icon which saves space
4) Click to start monitoring label no longer covers peak hold line completely
5) Click to start monitoring label now adjusts label based on available width
6) Click to start monitoring label now appears on vertical meter (not sure about this one...)
7) Reduced width of vertical meter by moving icon to left of meters
8) Includes a compact vertical meter now
9) Clipping indicator is easier to see
10) All 1-off drawing issues resolved (99.9% sure...I challenge you to find some ;-))
11) Bevels around meters are no longer overlaid by meter updates
12) "Old" menu handling code removed
13) Though not perfect since some non-English characters are taller/wider than the meters, non-English text is now handled better
14) Clicking play meter resets indicators as appropriate
15) Indicators on meters now stick around until the meter is clicked
16) Ugly flashing while resizing is now gone
17) There should be NO magic numbers in the code. Every +1 or -2 is explained in comments...
18) Size of L/R labels are recalculated now when preferences are updated (to pull in locale changes)
It corrects several "multiple project" problems with the
meter toolbars and meters.
In addition, there was a "multiple project" issue where
the transport buttons didn't disable properly in the
non-active project.
Adds a transition from green to yellow starting at -12 db
or (0.50 for linear) and ending at -6 (or .75). A transition
to red then occors to the end of the meter.
Meter preferences have been added and most of the context
menu items have been moved there.
In addition, you may now click the playback meter to reset
the peak level indicator instead of having to click the
record meter.
Substantial changes to MixerTrackCluster::UpdateMeter() such that it now uses the original Meter::UpdateDisplay() rather than the override I wrote.
I think some of the ideas in the override were good though, mainly to use max and rms from blockfiles rather than passing interleaved sample buffer to Meter::UpdateDisplay() and having it recalculate those values. May be worth revisiting. Definitely worth testing for performance issues relative to 1.3.12.
Also, since all we're doing here is updating the meters, maybe we should remove it from TrackPanel::OnTimer() and do that in audacityAudioCallback where it calls gAudioIO->mOutputMeter->UpdateDisplay(). Thread issues?