Commit Graph

196 Commits

Author SHA1 Message Date
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
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 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
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
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 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
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
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
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 5f27ae905c Changed misleading terminology in scrubber...
... It was confusing that HasStartedScrubbing() could be true
while also not IsScrubbing()
2018-07-29 14:20:11 -04:00
Paul Licameli a72b8f98c0 Bug1883, more: fix logic for choosing start & end times of recording 2018-06-11 15:02:20 -04:00
Paul Licameli 3051e9ce7e Stop button works during punch and roll recording 2018-06-09 15:43:17 -04:00
Paul Licameli ed660bdca2 More apt argument name 2018-06-09 15:25:59 -04:00
Paul Licameli e40420ba72 Rewrite logic for choosing append-record tracks...
... If recording one or two channels, use first unbroken subsequence within the
selected wave tracks for which the total of channels matches exactly; failing
that, use such a sequence among all wave tracks; failing that, record to
new tracks.

If recording more than two channels, and there is at least one selected wave
track, then use the topmost selected wave channels, up to the number of
recording channels, and if fewer channels are selected, just drop the extra
input channels.

If recording more than two, and no wave tracks are selected, ignore existing
wave tracks and record to new tracks.

In any case, the tracks chosen for append-record might not be consecutive
among all the tracks, because non-wave or non-selected tracks may come between.
2018-06-09 13:26:00 -04:00
Paul Licameli f9cd5595d5 Stop playback of pre-rolled tracks at the right time 2018-06-01 04:28:57 -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 f52b53fc50 Factor ControlToolBar::OnRecord...
... pulling out the function that chooses existing tracks for append-record,
and a function that does the recording once tracks are chosen.
2018-05-28 15:59:20 -04:00
Paul Licameli c7f97e7730 Bug1880: don't quantize DBL_MAX resulting in a negative value. 2018-05-28 13:28:08 -04:00
Paul Licameli f0ebf5823a Better punch-in precision: quantize start and end times for rate...
... So that samples of a new track align precisely with the old track, at least
in case the old track has the same rate and starts exactly at 0, which is
the likely usual case.
2018-05-26 23:46:41 -04:00
Steve Daulton fdf165d133 Clarify comment 2018-05-24 13:20:53 +01:00
Steve Daulton a2765d013f Remove duplicate project pointer 2018-05-24 13:20:53 +01:00
Steve Daulton 41315dac95 Make comment clearer 2018-05-24 13:20:53 +01:00
Paul Licameli 318967f00d Revert "If record overrides append because of channel count, record unlimited"
This reverts commit b36482d649.
2018-05-17 21:22:31 -04:00
Paul Licameli 1c751fd863 Revert "Change procedure to choose append-record tracks once again..."
This reverts commit bbcd924371.
2018-04-09 22:33:03 -04:00
Paul Licameli bbcd924371 Change procedure to choose append-record tracks once again...
... Allow recording stereo into non-adjacent mono tracks, if they are selected.

Prefer the earliest-starting set of tracks in the track list, among either
selected tracks, or else among all tracks.

Therefore if selection contains a mono, a stereo, and a mono in that order,
the two monos may be chosen to record new stereo.
2018-04-09 22:12:50 -04:00
Paul Licameli 8de9c53e9e Allow again recording of stereo into two adjacent mono tracks 2018-04-08 17:41:27 -04:00
Paul Licameli 5fe3c1bdd0 Append-Rec: Prefer first, not last, track with correct # of channels 2018-04-08 16:37:40 -04:00
Paul Licameli b36482d649 If record overrides append because of channel count, record unlimited 2018-04-07 23:37:51 -04:00
Paul Licameli 9fcccd32ac Rewrite append-record onto only the proper number of channels 2018-04-07 23:32:23 -04:00
James Crook af54ac9cf6 Don't record a stereo track into a mono track
Or more precisely, don't do append-record, if doing so would lose a channel - e.g. if there is only a mono track selected and recording is set to stereo.
2018-04-05 11:53:58 +01:00
James Crook 76f72f0a3b Don't record a mono track into a stereo track. 2018-04-04 22:36:07 +01:00
James Crook 35127c44b7 Bug 1548 - Newly recorded tracks do not acquire focus 2018-03-24 16:05:10 +00:00
Paul Licameli 9b7ccc4dff Use TranslatedInternalString for tips of toolbar buttons 2018-03-15 20:13:19 -04:00
Steve Daulton 1ef4d73629 bug 1839 - Consistent recording behavior
Same behavior whether there is playback or not.
2018-02-28 21:20:06 +00:00
Paul Licameli aa72cae61b Follow wxWidgets argument conventions for other window factories 2018-02-21 19:21:05 -05:00
Paul Licameli c0f2782695 Fix interaction of recording and undo...
... in case you also do things, concurrent with the recording, that affect the
undo stack, either by pushing it (such as by changing the gain on one of the
playing tracks, or making a label) or by "Modifying state" without a new undo
item (such as when you change its size or mute or solo).
2018-02-21 19:21:00 -05:00
Paul Licameli 57ce726a25 Rename Meter as MeterPanel, and some DOxygen 2018-02-21 17:50:28 -05:00
Paul Licameli 950898dcb9 Revert "Bug 1823: Better interaction of undo and record..."
This reverts commit 1e8aba968d, reversing
changes made to 6e75ae58ac.
2018-01-14 21:27:41 -05:00
Paul Licameli 91f5446eb1 Fix interaction of recording and undo...
... in case you also do things, concurrent with the recording, that affect the
undo stack, either by pushing it (such as by changing the gain on one of the
playing tracks, or making a label) or by "Modifying state" without a new undo
item (such as when you change its size or mute or solo).
2018-01-14 19:33:39 -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 6967925e48 Redo CommandManager::DescribeCommandsAndShortcuts with pairs...
... Later we may make other types for the members of that pair.
2018-01-08 14:14:22 -05:00
James Crook 5e761f2245 Fix Record button pops up when clicked and it is down. 2018-01-06 16:15:04 +00:00
James Crook 41ac4cd47a Add Hover-Over-Down State for Button
Previously hovering over a down button made no difference.
Also tweaked the appearance of hover-over thumbs on dark theme sliders.
Also tweaked hover images and colours generally.

Classic retains the old style.
Hi Contrast does not distinguish between hover-up and hover-down.
2017-12-14 14:39:56 +00:00