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

215 Commits

Author SHA1 Message Date
Paul Licameli
b4ce681867 WaveTrack.h does not include WaveClip.h 2019-03-18 01:44:42 -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
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
a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli
b2a45a17da Fix display of stereo first time reopening compressed/losseless save 2018-12-20 14:13:53 -05: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
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
51842fc78b Use TypeSwitch and track_cast 2018-10-01 10:58:47 -04:00
Paul Licameli
03dc815aee Pointer downcasts should use static_cast not reinterpret_cast 2018-09-29 12:46:19 -04:00
Paul Licameli
35f5555216 Track::mChannel has an enum type 2018-09-29 12:42:46 -04:00
Paul Licameli
fe81760522 Eliminate EXPERIMENTAL_OUTPUT_DISPLAY, again...
See commit 5407079c6228c114bbb2207a85c06488c5e4a2f9 which removed all of it

A needless bit of it got merged in again later from another development.
2018-09-14 10:42:16 -04:00
James Crook
b91300caf0 Bug 1947 - Clicky play when dynamically changing number of playing channels
Rather than 'cut' (i.e. drop, not cut as in 'cut preview') channels immediately, we now only do so
if their last gain was already 0.0.  Instead they micro-fade out.  Later when the channels come back,
their last gain will be 0.0, so they will micro-fade in.

A comment explains that the code would be cleaner if we just computed gains, and not whether to
drop channels.
2018-08-25 13:07:45 +01:00
James Crook
9012b98eca Init mOldGains
I'd neglected to do this, which can lead to unwanted noise.
2018-08-24 22:51:31 +01: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
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
James Crook
2d2f282c83 Bug 825 - Sync Lock behaves inconsistently when moving of clips is disabled
Sync Lock on now means clips can move.  So it 'trumps' that setting, when on.
2018-04-11 18:51:31 +01:00
James Crook
2db691dc67 Bug 1860 - Enh: Add preference to disable half-wave view on collapse. 2018-03-27 14:41:06 +01:00
Paul Licameli
83a01e255f Redo view mode choice in Tracks preferences 2018-03-25 14:35:12 -04:00
James Crook
de53f64757 Bug 499 - Normalize includes white space in offset calculation 2018-03-25 15:58:34 +01:00
andheh
87eaaa6f45 fixing strict-aliasing rule violations by passing enum types as int references 2018-03-06 21:30:39 +00:00
James Crook
4724c6a131 Fix spectral preferences extra caching issue. 2018-02-24 14:20:29 -05:00
Paul Licameli
8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -05:00
Paul Licameli
b2c69cb0f6 Define WaveTrack::Reinit() 2018-02-21 19:21:00 -05:00
Paul Licameli
3f05063681 Split "Do" functions out of the "Set" functions for some Track settings 2018-02-21 19:20:55 -05:00
Paul Licameli
4ef8da8f16 Revert "Preliminaries to support better interaction of undo and recording"
This reverts commit 6e75ae58ac56d9c94af5a4ce97951f627808473a, reversing
changes made to 714d53e00f803643131bb775858ac930b39dd5b8.
2018-01-14 21:36:33 -05:00
Paul Licameli
950898dcb9 Revert "Bug 1823: Better interaction of undo and record..."
This reverts commit 1e8aba968da56374d74fb5589caa56caf5fe1283, reversing
changes made to 6e75ae58ac56d9c94af5a4ce97951f627808473a.
2018-01-14 21:27:41 -05:00
Paul Licameli
89d8fe18b1 Define WaveTrack::Reinit() 2018-01-14 19:33:39 -05:00
Paul Licameli
8b60e7f02d Split "Do" functions out of the "Set" functions for some Track settings 2018-01-14 19:03:52 -05:00
Paul Licameli
5407079c62 Remove EXPERIMENTAL_OUTPUT_DISPLAY...
... Maybe a good feature idea, but the implementation pollutes the code in
too many places.

It's a special case of the more general idea of many-to-one associations
between screen rectangles and track objects.  More generalized ways to
accommodate that should be sought.
2018-01-12 12:08:09 -05:00
Paul Licameli
c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
Paul Licameli
4d978bcefb Use wxPrintf not printf 2017-12-16 11:54:32 -05:00
James Crook
13c6fdf663 VZooming Changes
1: Guard zone 8 pixels wide in VRuler to reduce risk of accidental use.
2: VerticalZooming preference, for VRuler zooming, off by default,
3: Enabled Paul's right-click menu in VRuler with some extra
presets (x2 and x0.5)
4: Rearranged some messy code with lots of ifs to use a switch.

Also, with EXPERIMENTAL_HALF_WAVE defined we now get a
'half wave' option in the VRuler menu, that shows the wave top half.
We also use it in collapsed waves (and collapsing and restoring
a WaveTrack will get you back to normal zoom.
2017-12-11 18:41:48 +00:00
James Crook
f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Paul Licameli
61f4284e10 Make append-recording insert clip boundaries again 2017-11-24 12:29:36 -05:00
Paul Licameli
f136b5c530 Reviewed uses of InconsistencyException outside Sequence.cpp 2017-11-19 01:48:41 -05:00
James Crook
0bae8c3a90 Bug 1774 - Recording does not honor waveform color
New clip now takes colour from WaveTrack, and new WaveTrack takes colour of the WaveTrack its clips will be appended onto.
2017-11-07 14:26:32 +00:00
James Crook
c28be778e2 Linty fixes
This commit fixes a number of warnings shown in compilation with MSVC.  No behavioral changes intended.  I did not fix signed/unsigned warnings.
2017-11-07 14:23:30 +00:00
James Crook
68897d8932 Some cppcheck fixes by David Binderman 2017-11-04 17:47:39 +00:00
James Crook
b48c6b0fd6 Clip (and track) colours now persists in .aup file. 2017-11-04 17:47:22 +00:00
James Crook
42c52de7f1 Coloured clips basics
These basics add a colour index to each clip and track, and allow for a choice of four colours to be set from the track menu drop down.  The additional wave colours (red, green and black) are not currently configurable, and the colour index is not currently saved.
2017-11-04 17:47:02 +00:00
Paul Licameli
bea1a089ff spelling 2017-10-21 11:23:55 -04:00
Paul Licameli
404eca84c8 Implement mayThrow argument of WaveTrackCache::Get properly...
... So that we don't get into a loop re-throwing exceptions while trying to
draw a corrupt project.

And so that we don't crash playing a corrupt project.
2017-10-21 10:39:39 -04:00
James Crook
1b4999d0d3 Bug 1290 - "Split New" clips cannot be dragged back into the track they came from.
Earlier fix was broken and allowed clips to overlap.  Updated code:
- Checks that the modified slide amount is legal, against ALL clips, not just against later clips in the array.
- Computes tolerance correctly.
- Typically uses tolerance just once.
- Moves selection with clip
- Only restarts sliding with a 'clean slate' IF there was room on the original track.

Previously the code could reject a move to a new track, and then mistakenly allow just the horizontal part of the move on the original track(s), even with a clip blocking the way.
2017-08-23 18:15:00 +01:00
James Crook
e984211cce Bug 1290 - "Split New" clips cannot be dragged back into the track they came from.
Fixed by giving some tolerance in how the dragged clip(s) are placed.
The tolerance is 1px, so it depends on the zoom.  Therefore if zoomed in your positioning is more precise.
2017-08-19 22:46:33 +01:00
James Crook
4d43d2273b Bug 1516 - Clips: Can't drag vertically if starting position of clip overlaps clip in target track 2017-08-19 17:53:50 +01:00
Paul Licameli
1ef235c21c Bug1661: Default audio track name not being translated...
... Problem was introduced in 2.1.3 at:
8a6edf3623662b6cb3eb90e794c34e44c283c33d
2017-07-21 17:29:52 -04:00
Paul Licameli
cb9d37f362 build fix 2017-07-09 14:09:33 -04:00
Paul Licameli
84b5fd6075 Compute default WaveTrack height analogously to NoteTrack...
... though in fact this comes to the same 150 pixels as before, given the
present layout table.
2017-06-06 22:39:30 -04:00
Paul Licameli
5ff09c2a59 Cut from flat TimeTrack does not leave unnecessary points...
... And more generally, Envelope::CollapseRegion, should it be reused more
widely, is responsible for removing the points; WaveTrack code is relieved of
that.
2017-05-28 00:50:35 -04:00