1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-19 09:30:52 +02:00

869 Commits

Author SHA1 Message Date
Paul Licameli
0f3f13502c Fix hot zones of sub-view cursors...
which got broken at 876cd92ed3a1729a4211938ab3c67c649df4cb3e

And remove duplicate function
2020-01-17 16:04:45 -05:00
Paul Licameli
851b49d912 Avoid churn of handles for sub-view adjustment and rearrangement 2020-01-17 15:53:33 -05:00
Paul Licameli
b45e3e8aac Separate default waveform scale choice in Tracks preferences...
... Some complications in handling correct migration of preferences from
config files in older versions
2020-01-17 12:28:52 -05:00
Paul Licameli
6c3731061f Switch priority of adjust and rearrange hit tests for sub-views 2020-01-17 11:03:25 -05:00
David Bailes
64079c3f55 Keyboard scrubbing: faster change of direction
If one of the keyboard scrubbing keys is being held down, and the other keyboard scrubbing key is pressed:
1. With current behaviour, scrubbing in the other direction only starts when the original key is released - scrubbing stops and then starts in the other direction.
2. With the new behaviour, scrubbing immediately changes direction, and does not stop when the original key is released - scrubbing does not stop and then start again.

New behaviour:
If one of the keyboard scrubbing keys is being held down,
2020-01-17 09:32:17 +00:00
Paul Licameli
6fd29ad863 Restrict y coords of the hot zone for the new sub-view rearrangement 2020-01-16 15:01:52 -05:00
Paul Licameli
a95838a3e8 Better cursors for sub-view rearrangement 2020-01-16 12:06:59 -05:00
Paul Licameli
a1ef73398b Implement click and drag to rearrange sub-view permutation...
... The hot zone is 15 pixels wide at the left of the track contents, and the
cursor is a hand.  Those particular choices can be easily amended.
2020-01-15 13:50:28 -05:00
Paul Licameli
1fa41808c2 Some refactoring of SubViewAdjustHandle 2020-01-15 13:44:10 -05:00
Paul Licameli
94af81b9f7 Fix Ubuntu build 2020-01-15 11:08:17 -05:00
David Bailes
6b9c8e79cc Bug 1954: Clicks may occur starting/pausing play-at-speed or Scrub
Problem:
On Windows, after 50ms, there is a short period of roughly zero introduced into the output. On Linux, there is also a spike which sounds like a crackle.

In AudioIO::FillBuffers(), Mixer::SetTimesAndSpeed() is called, which sets mT0 and mT1 to a small interval.
In Mixer::MixVariableRates(), all the samples in the interval are used, which means the Resample::Process() is called with last equal to true.
So when Mixer::MixVariableRates() is called again, the resampler is being reused after a call to Process() in which last is true.
It is not stated in the soxr documentation if the resampler will produce valid results in this case, and it's only the scrubbing code which does this.
I think this is the problem, and so the partial fix below avoids this happening.

Partial fix for play-at-speed and keyboard scrubbing:
For these, there is no need to reset the values of mT0 and mT1. (There is no need to allow for the sample position being used to potentially jump around.)
So for these cases, Mixer::SetSpeed() is called, rather than Mixer::SetTimesAndSpeed().
2020-01-15 11:12:40 +00:00
Paul Licameli
cbe4a46af2 Bug2265: Should save and restore track heights...
... Regression happened at 3f1fd8ced0fb5fe617ad2dd7808cd1ae2ca2c0f3

The heights were written to file, but not read back again.

This fix was done carefully to avoid making dependency cycles.  We don't want
Track to depend on TrackView or TrackControls.

It's not great that LabelTrack, NoteTrack, TimeTrack, and WaveTrack now have
those dependencies, but at least they don't make cycles.

It would be better to figure out how to attach the view and controls to the
track with ClientData, then just invoke BuildAll to repopulate the view and
controls, so that they are non-null when you reach
Track::HandleCommonXMLAttribute.
2020-01-14 20:04:32 -05:00
Paul Licameli
9e0372cbea Bold, clickable, butting clip boundaries also in spectrum view 2020-01-14 15:16:30 -05:00
Paul Licameli
97b7572504 Stroke clip edges in spectrum views too, improving split appearance 2020-01-14 14:37:54 -05:00
Paul Licameli
98bd937389 Add the multi-view menu item only if there are multiple sub-views...
... anticipating possible subtraction of all spectrogram code into an optional
plug-in in a later release
2020-01-14 14:06:22 -05:00
Paul Licameli
caf36b42ca 886c80b: Add a comment referencing the correct bug number, 2275 2020-01-13 17:51:27 -05:00
Paul Licameli
886c80bbca Bug2267 residual: do something about un-checking the last sub-view...
... when in Multi View mode.

And what we do here is disable the menu item.  The visible check indicates
which view is enabled, but you are not allowed to un-check it.  While the
Multi View item appears enabled and with a check mark.  That should be
suggestive enough to let the user discover how to exit multi view.
2020-01-13 17:48:18 -05:00
James Crook
1176b61953 Wording changes, per wiki:
https://wiki.audacityteam.org/wiki/Wording
2020-01-10 17:02:31 +00:00
Paul Licameli
d28967b7ad Bug2275 residual: don't get into state where you can't select audio...
... if you enter multi-view, then (try to) toggle both sub-views off.

Now instead, the second toggling will have no effect.
2020-01-09 15:15:11 -05:00
Paul Licameli
4018546a96 A comment 2020-01-09 15:15:11 -05:00
Paul Licameli
dd0e41048f Bug2282 residual: Partition sub-view heights 1:1 not 2:1...
... when doing steps to reproduce in that bug report
2020-01-09 15:15:10 -05:00
Paul Licameli
8fa01eceb4 Bugs 2282, 2275: crashes in multi-view...
... when you shrink a sub-view then toggle it, or toggle all views off then
exit multi-view

Fix it by making GetSubViews more robust to contents of mPlacements
2020-01-09 15:15:04 -05:00
Paul Licameli
d01c24d4d6 Revert "Bug 2282 - Multi-view: Array out of bounds exception (crash)"
This reverts commit e047c07a90e25eaee775922ee3b963f154c3ea76.
2020-01-09 15:12:00 -05:00
Paul Licameli
da2f5491ae Revert "Bug 2275 - Crash when unchecking Multi-view with neither of the views checked"
This reverts commit 57ff92b20c01ce6da39475858775619a532e106b.
2020-01-09 15:12:00 -05:00
Paul Licameli
d50dae4dd2 Bug2279 fix reimplemented...
... Don't hard-code the number of sub-views as two.

This modifies the fix at commit 596fd7c02f487aac65046c0ec46d680d69ee21e8
2020-01-09 14:01:12 -05:00
James Crook
57ff92b20c Bug 2275 - Crash when unchecking Multi-view with neither of the views checked 2020-01-09 15:56:00 +00:00
James Crook
e047c07a90 Bug 2282 - Multi-view: Array out of bounds exception (crash) 2020-01-09 15:13:36 +00:00
James Crook
596fd7c02f Bug 2279 - Multi-view: turning it on does not cause a split Multi-view to be displayed 2020-01-09 14:04:31 +00:00
David Bailes
d22edcbc10 Keyboard scrubbing: change some of the parameters
Changes to some of the parameters, based on user feedback.
2020-01-08 09:05:53 +00:00
Paul Licameli
e2adccb461 Don't use GetActiveProject drawing pan, gain, velocity sliders 2020-01-06 14:14:21 -05:00
Paul Licameli
d244b55709 Don't use GetActiveProject when drawing label track 2020-01-06 14:14:21 -05:00
Paul Licameli
f0b75832b4 Remove uses of GetActiveProject in some dialogs 2020-01-04 13:55:34 -05:00
Paul Licameli
c3b32d1106 Remove GetActiveProject where finding track panel button tooltips 2020-01-04 12:59:37 -05:00
Paul Licameli
9029eee5bd Remove GetActiveProject from SelectHandle 2020-01-04 12:59:37 -05:00
Paul Licameli
c9a9c06bd0 Pass AudacityProject * into preference panel factories 2020-01-04 12:37:57 -05:00
Paul Licameli
92b857d551 Remove unnecessary const_cast 2020-01-04 11:59:44 -05:00
Paul Licameli
dffe3155b0 Pass AudacityProject & into ButtonHandle::Tip 2020-01-04 11:27:28 -05:00
Paul Licameli
f64bc5a829 Pass non-const AudacityProject to HitTest::Preview...
... because that will be needed for elimination of some GetActiveProject()
calls.  Because some overrides need to find the focused track, but that may
mutate the project by setting the focused track when it wasn't yet defined.
2020-01-04 09:40:33 -05:00
Paul Licameli
db6265d4e7 Fix build 2020-01-03 10:14:12 -05:00
Paul Licameli
4a5abc9e41 Pass AudacityProject* to more methods of UIHandle 2020-01-03 10:09:46 -05:00
Paul Licameli
83f7bc6b5c Eliminate some uses of GetActiveProject...
... where there was already a project at hand
2020-01-02 13:15:14 -05:00
Paul Licameli
fce85d0e56 Don't use GetActiveProject in track panel pop-up menu handlers 2020-01-01 22:06:16 -05:00
Paul Licameli
7dbca958a6 CellularPanel passes AudacityProject* to DoContextMenu() of cell 2020-01-01 21:57:39 -05:00
Paul Licameli
12bbafe013 Separate storing of user data from initialization of popup items 2020-01-01 21:54:45 -05:00
Paul Licameli
0256156dec Implement Multi View checkbox menu item in wave track TCP...
... When it's off (default), Spectrum and Waveform buttons behave as before,
and dragging of the sub-view separator is disabled.

When it transitions to off, and the view is split, then the top sub-view takes
up the whole view.

When it transitions on, nothing visible happens.

When it is on, and you choose Spectrum or Waveform, then the corrsponding
sub-view toggles visibility.

When a sub-view is turned on by the menu item, it appears lowest.
2020-01-01 15:37:49 -05:00
Paul Licameli
00661d273a Scale choices at the top of the Waveform pop-up menu...
... as they have been in the menu for spectrum
2020-01-01 12:05:14 -05:00
Paul Licameli
389d04459a Move choice of waveform scale from TCP menu to ruler context menu 2019-12-31 19:26:51 -05:00
Paul Licameli
917e84f382 Implement double-click at the view separator to split view evenly...
... And this can even change an unsplit view to evenly split when you get the
 cursor near the top or bottom
2019-12-31 11:21:28 -05:00
Paul Licameli
b747e88304 Bug2256: complete the fix, see 17ed489 2019-12-30 23:11:55 -05:00
Paul Licameli
17ed4899ec Bug2256: Resizing channels should not change subview proportions 2019-12-30 17:38:07 -05:00