1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 00:30:07 +02:00

38 Commits

Author SHA1 Message Date
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
57ce726a25 Rename Meter as MeterPanel, and some DOxygen 2018-02-21 17:50:28 -05:00
James Crook
419b790235 Make monitoring work after a theme change 2017-04-05 17:29:24 +01:00
Paul Licameli
0113e6f44f Remove naked new[] in: ondemand, toolbars, widgets 2017-03-17 17:52:45 -04:00
Paul Licameli
ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli
67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00
Paul Licameli
71efb13161 Remove some naked new amd delete in: widgets 2016-08-08 07:51:26 -04:00
Paul Licameli
4739f3e27b Compensate for wxW 3 tab navigation deficiencies on Mac...
... using char hook event handlers.  We don't need to go the extreme length
of patching wxWidgets source.
2016-06-25 19:14:05 -04:00
Paul Licameli
57788c8d7a Fix Mac tabbing to sliders and meters, analogously to buttons...
... And make sure they don't steal focus when clicked or double clicked
2016-06-25 16:08:38 -04:00
Paul Licameli
0a0cbbba20 Mousing over the menu button of device meters (combined or separate) highlights 2016-05-04 10:59:18 -04:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... 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.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... 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.
2016-02-24 20:58:30 -05:00
Leland Lucius
93aeca9a48 Fix for bug #1203 2015-09-16 13:08:03 -05:00
Paul Licameli
f81231efae Remove Sequence.h from other headers 2015-07-28 10:02:08 -04:00
lllucius
3d420e019c Applied accessibility patch from David that I missed.
From David's message:

   "solution to the problem of getting jaws to read the updated
   name after choosing start/stop monitoring on the menu"
2015-01-19 17:47:39 +00:00
lllucius
a6ace4a606 Ignore the key up events after showing the context menu (on Windows only) 2015-01-09 15:27:58 +00:00
lllucius
5e46430d80 Update keyboard and a11y usage based on DB's suggestions 2015-01-05 16:36:17 +00:00
lllucius
8bef14df36 Addresses meter accessibility mentioned in bug #33
And also corrects the missing focus rectangle display on
the toolbar buttons on Linux.
2015-01-04 09:24:26 +00:00
lllucius@gmail.com
3a23757e2e All the menu to be opened from the keyboard on the Mac as well. 2015-01-04 02:25:56 +00:00
lllucius
c9cde48f21 Open popup menu under icon when using context menu key 2015-01-03 09:29:42 +00:00
lllucius
bec5866653 Persist meter state across toolbar resets and fix clipping indicator
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.
2015-01-01 23:29:08 +00:00
lllucius
6a3ef5565c Independent meters with combined menu/icon
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)
2014-12-28 03:18:00 +00:00
lllucius@gmail.com
9a23598d3f Fix for Linux and Mac builds...
Tried to second guess the headers neads and failed.
2014-12-19 17:05:54 +00:00
lllucius
9bbc261321 Attempt #2 at taming the meter toolbars
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.
2014-12-19 16:38:56 +00:00
lllucius
fe42e881a5 First stab at taming the meter toolbars
This should correct at least a couple of the reported
issues.  And it also has some fixes in for multiple
project support.
2014-12-17 19:16:08 +00:00
james.k.crook@gmail.com
94c243cb2e No disabled state for meters. Monitoring can be on or off. Input meter now has prompt when monitoring off.
I haven't got rid of the preferences for disabled/enabled.
2014-11-29 21:10:44 +00:00
james.k.crook@gmail.com
24a636d6ea Tidy up of code. Moved preferences menu to end of meter. Fixed memory leaks on some bitmaps. 2014-11-09 16:44:07 +00:00
james.k.crook@gmail.com
7ee3c47441 Added Space-Saver meters. These are now the default.
Fixed ResetToolbars so that SpectralSelectionBar is not shown after a reset.
2014-11-09 15:47:09 +00:00
lllucius
6ce364f2d2 Get rid of flicker when drawing the peak/rms meter. 2014-10-04 22:50:51 +00:00
lllucius
96417b912e Made the original peak/rms meter design selectable as suggested by Gale.
It can be selected in the meter preferences.
2014-10-04 09:47:48 +00:00
lllucius
62e3467b7d Meter display changes as suggested by Peter, Steve, and Bill
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.
2014-10-03 06:15:29 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
v.audacity
c26b3c6b49 Campbell Barton's further patch to turn many, many tabs to our 3-space convenbtion 2013-02-23 04:33:20 +00:00
v.audacity
913185d7b6 Fix Bug 258 - Mixer Board: max peak and clipping lines removed (P2).
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?
2010-11-29 22:36:32 +00:00
v.audacity
08904c22c0 Working on new bug reported by Gale about MixerBoard clipping indicators on small clipped regions.
Remove some unused cruft. Rearrange some #includes so they are grouped logically. Add comment about unclear names (bools "clipping" vs "isclipping").
2010-11-19 05:15:08 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00