1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

164 Commits

Author SHA1 Message Date
Paul Licameli
191cd23b54 XMLTagHandler.cpp has fewer dependencies...
... freeing three files from dependency cycles
2019-05-18 20:29:25 -04:00
Paul Licameli
548192fcf3 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:58:34 -04:00
Paul Licameli
56f51d8176 Revert "Remove redundant #include-s from .h files..."
This reverts commit b7fe62d17067b4441530dd36b25052cea3ad44b5.
2019-05-16 14:33:55 -04:00
Paul Licameli
b7fe62d170 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:15:05 -04:00
Paul Licameli
580e1a8a63 move a comment 2019-04-23 13:40:17 -04:00
Paul Licameli
4d29686116 Remove wx/gdicmn.h from headers 2019-03-30 11:52:48 -04:00
Paul Licameli
c3aad2e026 Remove wx/event.h from headers 2019-03-27 04:36:51 -04:00
Paul Licameli
1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli
bb634614e6 static overloads of Track::SharedPointer when null check is needed...
... Some optimizing compilers don't let us get away with null check on this
in a nonstatic member function.
2019-03-23 13:23:46 -04:00
Paul Licameli
f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
Paul Licameli
d261ea2558 Define and use utility template ValueIterator...
... generalizing the fix of commit 7591891 to other cases, making the iterators
safe for adaptation with std::reverse_iterator should the need ever arise
2019-03-18 08:44:40 -04:00
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
6f31a9f7dc Specific types, const versions: getting track & vruler controls...
... See changes to classes CommonTrackPanelCell and Track; the rest follows
2019-03-17 15:20:52 -04:00
Paul Licameli
166e73fdeb Make inherited TrackList::push_back private 2019-03-16 14:29:34 -04:00
Paul Licameli
47fa651d79 TrackList inherits std::enable_shared_from_this 2019-03-16 13:11:33 -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
David Bailes
012d707a8a Bug 2060: Windows: no access to microphone causes crash
Problem:
1. Set no access to microphone in Privacy category of Settings app.
2. Try to record in a new track. (not append to an existing track.)
3. Audacity crashes.

Cause of crash:
TrackPanel::OnTrackListResizing is called with a track after a call to
TrackList::ClearPendingTracks, which has removed its owner.
TrackPanel::OnTrackListResizing ends up calling TrackPanel::UpdateTrackVRuler,
and this function calls TrackList::Channels(t)), which assumes the track has an owner.
Crash.

Fix: in TrackPanel::OnTrackListResizing, check that the track has an owner.
2019-02-05 14:29:22 +00:00
James Crook
7030c9fc4f More doxygen 2018-11-03 13:18:26 +00:00
Paul Licameli
26abe0255d Precautions also in TrackIterRange::StaringWith() as in EndingAfter() 2018-10-30 11:37:08 -04:00
Paul Licameli
74a360f682 Bug2020: Fix sync-lock groupings 2018-10-30 10:54:37 -04:00
Paul Licameli
793949aa29 more comments about TrackIterRange operators 2018-10-30 09:32:29 -04:00
Paul Licameli
3be57fce49 Bug2015: crash repeatedly append-recording with sync-lock on 2018-10-29 20:35:45 -04:00
Paul Licameli
cda9715ce6 Fix TrackList event propagation 2018-10-27 21:26:07 -04:00
Paul Licameli
2741d58880 TrackList emits more events for certain changes of state of tracks...
... Also rewrote some of the existing event handling so all events from
TrackList are of the same, custom event class, and distinguishing addition
from resizing events, though this distinction is not yet used
2018-10-27 11:31:42 -04:00
Paul Licameli
75918918c4 Correct template parameters to std::iterator base of TrackIter...
... so that std::reverse_iterator<TrackIter<T>> works right, not making a
subtle error of return of reference to a temporary in its operator * with some
compilers.
2018-10-03 22:47:21 -04:00
Paul Licameli
32d767c7f5 Track::SetLinked() and Track::SetChannel() are private...
... but class WaveTrack needs to invoke SetLinked still during project load
2018-10-01 13:42:36 -04:00
Paul Licameli
7e6a543473 Define TrackList::GroupChannels() 2018-10-01 13:42:35 -04:00
Paul Licameli
2ee87082cb Track::GetLink and GetLinked are private, but SetLinked isn't yet 2018-10-01 13:42:34 -04:00
Paul Licameli
b36c3efec1 Track::GetKind is private 2018-10-01 13:42:34 -04:00
Paul Licameli
b5f52e7c1c Remove old style track iterator classes 2018-10-01 13:42:34 -04:00
Paul Licameli
b94e8fec96 Remove VisibleTrackIterator 2018-10-01 11:20:52 -04:00
Paul Licameli
05ddfaf82b Remove TrackList::Select 2018-10-01 10:47:51 -04:00
Paul Licameli
5c6fd64a0e TrackList::GetPrev and ::GetNext are private 2018-10-01 10:44:58 -04:00
Paul Licameli
a0e15cfbbd Remove TrackListIterator::RemoveCurrent 2018-10-01 10:42:02 -04:00
Paul Licameli
89748cbe3c Remove "skiplinked" argument of old track iterators 2018-10-01 10:35:46 -04:00
Paul Licameli
52848e4483 Define Track::TypeSwitch for type-safe dispatching 2018-10-01 10:32:48 -04:00
Paul Licameli
a3cdb08ee0 Classes and functions for type-safe iteration over tracks 2018-09-29 22:17:55 -04:00
Paul Licameli
6a9f9d7899 Define track_cast, like dynamic_cast...
... but perhaps faster using our custom type-query method.
2018-09-29 21:41:47 -04:00
Paul Licameli
6930b63192 Redo track kind as an enum class defined at global scope 2018-09-29 21:41:47 -04:00
Paul Licameli
35f5555216 Track::mChannel has an enum type 2018-09-29 12:42:46 -04:00
Paul Licameli
998556205d Replace wxWidgets arrays with std::vector 2018-09-29 12:10:28 -04:00
Paul Licameli
34cc1ff577 Rename, rewrite, and simplify use of FindPendingChangedTrack 2018-09-13 13:56:47 -04:00
Paul Licameli
4b950927b5 TrackList::GetGroupHeight is const 2018-09-13 09:53:48 -04:00
James Crook
0ce83abbfb Bug 1940 - Clicky play when adjusting Pan or Volume TCP controls 2018-08-24 22:30:20 +01:00
Paul Licameli
7f84e71324 Context menu handling is also in CellularPanel 2018-08-05 14:02:55 -04:00
Paul Licameli
35a97e09e7 Group arguments to StartStream, and a bit less of #ifdef for MIDI play...
... And pull choice of tracks and options out of DoRecord
2018-05-29 00:22:12 -04:00
Paul Licameli
4474dec9c2 Fix more hassle from the MSVC STL implementation. 2018-02-28 05:14:21 -05:00
Paul Licameli
bab8ea8393 Thanks for nothing, MSVC std::list<T>::iterator implementation...
... I worked around the unhelpful helps that made gratuitous runtime errors,
in debug builds but not in release.
2018-02-23 14:58:12 -05:00