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

486 Commits

Author SHA1 Message Date
Paul Licameli
cde1e1eaab Remove some duplication, fix EXPERIMENTAL_OUTPUT_DISPLAY and Esc key 2017-03-17 17:52:18 -04:00
Paul Licameli
64d163ebcd Make EXPERIMENTAL_OUTPUT_DISPLAY compile 2017-03-17 17:52:18 -04:00
Darrell Walisser
43291687a5 Bug 1401 - Wait for window visibility before starting timer 2017-02-25 16:16:42 -05:00
Steve the Fiddle
14c706e16b Bug 1560 - RTP effects: Repeatable crash using Track Dropdown Menu to split during transport
Fixed by disabling some menu items during realtime preview.
2016-12-16 22:53:54 +00:00
Steve Daulton
3a9983795f Bug 1547
Fix some 'on pause' inconsistencies.
2016-11-14 10:32:55 +00:00
Paul Licameli
8b66fc4b05 Restore change of Waveform dB scale with change of magnification...
... This is done with Shift+Ctrl+wheel and pointer in the vertical ruler, and
the pointer y coordinate near the bottom of the dB scale.

If y coordinate is far from there, then Shift+Ctrl+wheel changes dB level
without change of magnification (as before this commit).
2016-10-28 12:36:26 -04:00
David Bailes
ff9763f984 Add two commands to move the cursor/selection to next/prev label
The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.

A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.

If the commands are used during playback of the project, playback continues from the new cursor/selection.

The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
2016-10-24 14:24:20 +01:00
Paul Licameli
25b7a0040f Make shortcut keys for moves really appear in track control menu...
These are "Moved focused track up/down/to top/to bottom" in keyboard
preferences.

There were prior changes that made any shortcuts for them appear in the track
control drop-down menu, but only after closing Preferences.  They still did
not appear after restart of Audacity, although the keystrokes had their effect.

See commit bb7dba2b678735da60b857fa99e963396d5a875f
and commit 7608e9cb521a6d57a030e1339b980c85f6b97227
2016-10-21 10:51:17 -04:00
James Crook
44c3474e4e Prompt with 'Command-Click' on Mac, Not 'Ctrl-Click'. 2016-10-09 22:16:18 +01:00
James Crook
d6302bc370 Count stereo tracks as one track, not two.
The TrackIterator actually iterates through channels, so we need to skip the linked tracks when counting.
2016-10-07 21:53:10 +01:00
James Crook
fe2dfca3e0 Bug 1522 - No pointer or Status Bar indication of CTRL-click in waveform to move selection boundary
I also took the opportunity to modifier the Status Bar indications when in the TrackInfo.
1) We now mention ctrl click can select or deselect track.
2) If there is only one track, we don't now prompt about rearranging tracks, since you can't.
3) If you hover in a label track's VRuler (which is just a spacer so that things line up), you now don't get a message.
2016-10-07 21:38:18 +01:00
James Crook
2add9792ce Bug 1484 - (Residual) allow an unselected track to be an anchor. 2016-10-06 20:50:45 +01:00
James Crook
44375c252a Bug 1484 - No ctrl-click toggling; History for anchor (mLastPickedTrack) 2016-10-04 09:05:47 +01:00
James Crook
37a0cd3af6 Bug 1484 - Cannot one-step extend/contract selections vertically or horizontally to specific TrackSelFunc
Progresses us a little towards closing.  Ctrl-Click on waveform now removes track selection status, not just adds it, and we don't flicker on again subsequently when we drag.  Ctrl-Click won't remove the last remaining selection (by design).  Shift-Click can now reduce us down to one track, rather than the previous behaviour when reducing track selection.
2016-10-03 13:28:25 +01:00
Paul Licameli
f993f1eadf Regularize casts as (int), so they are easier to find and review 2016-09-20 08:42:11 -04:00
James Crook
e8f5e3e084 Revert "Avoid wasteful Refresh() in stereo track spectrogram view.
Was believed to cause other problems, namely with ruler not lining up with selection.
2016-09-19 19:59:08 +01:00
Paul Licameli
0323cb8e38 be explicit about || and && precedence 2016-09-18 10:36:55 -04:00
Paul Licameli
078ff056e2 Make many conversions sampleCount->size_t are explicit and checked...
... with run-time assertions.

I examined each place and reasoned that the narrowing was safe, and commented
why so.

Again, there are places where the sampleCount variable will later be changed
to have a different type, and they are not changed here.
2016-09-15 21:02:32 -04:00
Paul Licameli
78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
Paul Licameli
fbfee42a00 Remove another C style cast, and an unnecessary track kind test 2016-09-15 16:10:18 -04:00
Paul Licameli
88611a4530 Fewer C-style pointer casts of tracks; comments justify static_cast 2016-09-15 12:12:43 -04:00
Paul Licameli
39d514b183 Some more const, some stl idioms, remove unused declaration 2016-09-13 22:03:58 -04:00
Paul Licameli
ed21545c80 pixel column counts and sample window sizes use unsigned types 2016-09-11 20:28:13 -04:00
James Crook
0f417a65c7 RaphaelMarinier - Initialise mFreqSelTrack (found by Valgrind) 2016-09-11 22:00:01 +01:00
James Crook
4251ef8c48 Avoid wasteful Refresh() in stereo track spectrogram view.
Thanks to Darrell Walisser for the outline of the problem, which was causing laggy dragging of stereo track sizes in spectrogram view.
This was caused by refreshing the horizontal ruler unnecessarily.
2016-09-11 16:52:49 +01:00
Paul Licameli
b973698fdf Simplify some iterations over lists 2016-09-08 12:04:08 -04:00
James Crook
2fb18e8961 Bug 1496 - Mouse down while undoing in Envelope Tool corrupts Undo stack
The Ctrl-Z was interrupting the enveloping, making it finish, but it then got asked to finish again on a mouse up.  This change stops the second finish from happening.
2016-09-03 20:19:34 +01:00
James Crook
6881163129 Bug 1484 - (Residual) Alternative Ctrl-Click behaviour on Wave
Previously Ctrl Click on Wave behaved exactly as Ctrl Click on Track Control Panel.  With this change on wave it
(a) No longer toggles.  It only adds.
(b) It will extend and can be drag extended.

It is possible to change (a) to be toggle if that is desired.
This should ease the creation and extension of discontinuous track selections.
2016-08-31 23:38:54 +01:00
James Crook
c57f829200 Bug 1484 - (Residual) Shift-Click calculates start/end for itself.
Smarter logic, which extends down from the first or up from the last.
2016-08-30 23:46:12 +01:00
James Crook
beeb0c790c Bug 1484 - (Residual) Shift click on Wave/Label to extend (once again)
It turns out that having fixed the behaviour of Shift-Click on the Track Control Panel, I'd also fixed the behaviour of Shift-Click on the wave.  But then I blew it by over riding the Shift-Click behaviour on wave to use the version that does NOT horizontally extend.  This change comments out the 'bShift' and so gives us the original Shift-Click behaviour on wave, without undoing the other fixes.
2016-08-30 09:08:24 +01:00
James Crook
965a64eb2d Bug 1484 - Cannot one-step extend/contract selections vertically or horizontally to specific tracks 2016-08-29 22:26:11 +01:00
James Crook
0f2585a8ee Bug 1253 - Assert when changing track spectrogram settings while audio I/O active
I first of all added a warning message if trying to configure while playing.
Then decided that it is more in keeping with current style to grey out the Spectrogram Settings menu item.

So the new warning message should actually never be reached.
2016-08-28 16:32:41 +01:00
Paul Licameli
127b2a6acf Fix more narrowings of sampleCount 2016-08-26 12:42:22 -04:00
Paul Licameli
79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli
1281f1b14b Common function limits buffer size to sampleCount known to be small 2016-08-23 12:46:10 -04:00
James Crook
be66873fca Restored bevels on TrackInfo.
Aesthetic choice, currently disabled in run up to 2.1.3.
Lowest edge of bevels now hidden correctly on smaller panels (if bevels enabled).
2016-08-21 18:17:51 +01:00
Paul Licameli
5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.

Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
2016-08-20 13:58:56 -04:00
Paul Licameli
cb48ca2b91 Use arrays of smart pointers to WaveClip 2016-08-12 20:53:38 -04:00
Paul Licameli
b548e641ae Simplify iterations over WaveClips outside of WaveTrack/WaveClip; ...
... also add some const qualifiers
2016-08-12 20:53:37 -04:00
Paul Licameli
cb7872f980 use std::vector to hold TrackClip; move ctor and dtor out of line 2016-08-12 20:53:37 -04:00
James Crook
5939fe66e8 Bug 1053 - [Scrub Phase I] Status Bar messages incomplete for scrub started with menu or shortcut. 2016-08-10 21:57:29 +01:00
Steve Daulton
256a8aaedd Consistent vert/horizontal waveform zoom/scroll
Shift+Wheel -> scroll
Ctrl+Wheel -> zoom
Ctrl+Shift+Wheel -> Waveform dB end range adjust (when visible).
2016-08-09 17:01:05 +01:00
Paul Licameli
15004b1ade More uses of std::make_unique 2016-08-08 10:07:37 -04:00
Paul Licameli
a52f7f8410 new -> NEW in comments, so text search for naked new excludes them 2016-08-08 10:07:37 -04:00
Paul Licameli
60260520dc Remove some naked new amd delete in: TrackPanel 2016-08-08 07:38:30 -04:00
Paul Licameli
3b6dcfcc32 Remove some naked new amd delete in: TrackPanel::mAx 2016-08-08 07:38:30 -04:00
Paul Licameli
84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
James Crook
763485b0dc Add error check comments.
These are places where we don't properly handle error returns.
2016-07-10 21:40:48 +01:00
Paul Licameli
15bb2f0434 Lower a piece of text box dragging logic out of TrackPanel...
... This might cause more redrawing of label tracks for left click without
Shift, but who cares.
2016-07-10 03:21:05 -04:00
Paul Licameli
06fd481815 Don't need to delay certain state changes of LabelTrack until drawing 2016-07-10 03:21:05 -04:00