1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

683 Commits

Author SHA1 Message Date
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
41175e94cd Simplify by removing many std::move of shared_ptr to tracks...
... Don't need them, as we did with std::unique_ptr
2019-03-16 13:11:33 -04:00
Paul Licameli
a0aa69a248 All tracks allocated with make_shared, no more make_unique...
... so that we can use Track::SharedPointer without undefined behavior even on
tracks that don't yet belong to any TrackList.

Also fix the return type of function template TrackList::Add and remove some
casts.
2019-03-16 13:11:33 -04:00
Paul Licameli
6f89c48873 Reimplement Track::Pointer using std::enable_shared_from_this...
... now the Track need not be owned yet by a TrackList
2019-03-16 13:11:32 -04:00
Paul Licameli
dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli
dcd82b8ef5 ShuttleGui::AddChoice takes int to specify selection, with a default...
... This makes things brief and where non-default avoids some repetition of
literal strings
2019-03-15 23:35:13 -04:00
Paul Licameli
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli
dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -04:00
Paul Licameli
dd8eb9e3d9 Less use of wxArrayString::Index() ...
... instead use the utility make_iterator_range and its index() or contains()
method.  This generic utility works with any container defining begin() and
end().

This further lessens dependency on wxWidgets container idioms.
2019-03-10 14:45:06 -04:00
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
James Crook
b5d4a828d1 More doxygen 2018-11-04 14:21:00 +00:00
James Crook
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
Paul Licameli
303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
Paul Licameli
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
a7df004a88 Don't include Project.h or ODTask.h needlessly in other header files 2018-10-16 17:36:38 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01:00
James Crook
7e5a716e65 Fix C4458 Warnings
C4458 is 'Declaration hides class member'
2018-10-10 19:46:25 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli
beebe648fb Remove more uses of Track::SetLinked() and Track::SetChannel() 2018-10-01 13:42:36 -04:00
Paul Licameli
fee0f284fe Rewrite many iterations over tracks and channels in src/toolbars 2018-10-01 11:25:07 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
9a45c02002 Bug 1983 residual - A better fix for the residual.
The previous fix did not handle the case of the mixer toolbar being smaller than its minimum size.
The new fix does, and the code is simpler.
2018-09-20 15:35:07 +01:00
James Crook
ce31c371b9 Bug 1983 residual - Width of mixer toolbar changes. 2018-09-20 14:33:19 +01:00
James Crook
f07e40a4c0 Bug 1983 - Preference updates do not preserve toolbar widths 2018-09-20 13:16:09 +01:00
Paul Licameli
a90c6c45f3 Remove redundant calls to update toolbars 2018-09-15 18:24:16 -04:00
Paul Licameli
01634938cc Fix: Undock Tools toolbar; then reset toolbars Mac...
... Used to need two resets to get the correct result, now only one.
2018-09-15 18:23:51 -04:00
Paul Licameli
fb101964df Improved algorithm for rearranging toolbars after docking one...
... A double-height bar can now insert left of two stacked single-height bars.

For instance you can un-dock the Tools toolbar from the default setup, then
drag it back, and now get the same result as you started with.
2018-09-15 18:19:18 -04:00
James Crook
cbe778adb5 Bug 1977 - Simpler rule for 'Default sample rate' and 'Project rate'.
After discussion it was felt that only using 'Default sample rate' for new projects was better.
2018-09-13 10:48:11 +01:00
James Crook
993cea506d Revised fix for Bug 1977 - Using Spectrogram Settings in TCP causes Audacity to reset Project Rate to default 44100 Hz
This revised fix:
- No longer attempts to drive "Default sample rate" from the selection toolbar.
- No longer drives 'Project rate' direct from prefs.  It's usual it comes from the project.
- Instead 'Project rate' in the project might change if 'Default sample rate' pref is updated, but ONLY if the project has no tracks.
- When 'Project rate' in the project is updated, that is now always signaled to the selection toolbar.  Previously it wasn't.
2018-09-11 15:07:25 +01:00
Paul Licameli
2063056243 Bug221 re-fixed with better exception safety: see commit 1deff18...
... in case only some tracks successfully allocate, de-allocate all before
propagating the exception.
2018-09-10 17:51:50 -04:00
James Crook
a66d7442a3 Bug 1977 - Using Spectrogram Settings in TCP causes Audacity to reset Project Rate to default 44100 Hz
The Project Rate in the Selection Toolbar and in the Preferences dialog are now the same thing.  They ALMOST were before, causing confusion, and this bug.
This means that the fancy mechanism to set 'other' rates in Preferences is moot, since the Selection Toolbar bar does not have that option.  49000 will be overridden by 48000 for example.
2018-09-10 20:23:22 +01:00
James Crook
1deff18c15 Bug 231 - Cut Preview should play all selected/sync-locked tracks, respecting Mute/Solo during preview 2018-09-10 16:57:36 +01:00
Paul Licameli
af276ac4f9 Now implement scrubbing default to unpinned, see commit ac1017e...
... This was motivated by punch and roll recording:  it appears most convenient
to pin the head for recording purposes, and drag it near the right, but when
stopping and finding the splice point for the correction, it is better to
scrub unpinned.
2018-08-31 10:46:08 -04:00
Steve Daulton
27ede251d5 Don't collapse recorded tracks when Auto-fit enabled 2018-08-27 14:45:25 +01:00
David Bailes
ecb1cbdf3a Play at speed slider: fix page up/down increments
These increments were accidentally changed by the commit: 5e10ec0def1e1b6d2f0729bcb74edd0b95ca1a34

Changed back to original values.
2018-08-20 15:08:32 +01:00
Paul Licameli
aeba34b152 Bug1930: should draw bottom channel when append-recording...
... Bug happened only when append-recording by pressing the toolbar button, not
by using a shortcut key; and the blank track did get drawn if you moused over
it or hid and showed the window.

Turns out TrackPanel::ProcessUIHandleResult did the needed update, which was
lacking otherwise.  Now TrackList::UpdatePendingTracks is called in another
place.
2018-08-12 19:28:24 -04:00
Steve Daulton
1d22ca5789 Improve error message when capture stream fails
Rather than just guessing at the cause of the error, include the actual
error string from PortAudio.
2018-08-12 19:14:56 +01:00
Pokechu22
72b71bbe08 Use fixed play speed when note tracks are present
Scrubbing doesn't support note tracks, but time tracks do support it.
2018-08-11 18:23:15 +01:00
James Crook
adb33f466e Bug 1494 - Strange Pause behaviour with seeking/scrubbing
Now instead of the (strange) Pause, we Stop.
2018-08-08 18:40:16 +01:00
James Crook
bf6b47dbb4 Bug 1918 - Left to right (LTR) language selection reverses elements that should not be reversed
This does not entirely fix LTR language support, but dramatically ameliorates the problems originally reported in bug 1918.
2018-08-08 16:33:00 +01:00
Paul Licameli
b502d88285 Better enum value name 2018-08-06 21:58:41 -04:00
Paul Licameli
aeece118e8 Rewrite the handling of quick play indicators...
... All updates of position are done in DoGetRectangle().  Ruler need only
expose one function, DrawOverlays().

Don't redraw indicators twice when dragging (hiding and showing again), making
some flicker.  Just do one update.
2018-08-04 15:35:36 -04:00
Paul Licameli
0dddcf44cb Some uses of wxWindowRef, a weak pointer that won't become dangling 2018-08-01 22:49:37 -04:00