Problem. When an effect is applied, whatever track is the original focus, there is a focus event for track one. This causes NVDA to read out the track name of track 1, which is unnecessary noise.
The reason for this is that the execution of the Progress dialog destructor causes AudacityProject::OnActivate() to be called which causes a set focus on the TrackPanel. When this happens, the pointers to the selected tracks have changed, but the final focus has not been set (at the end of AudacityProject::DoEffect()). So TrackPanelAx::GetFocus returns the first track.
Fix: Modify TrackPanelAx::GetFocus so that if the existing pointer to the focused track is null, then use the track at the same position, if it exists.
... Contrary to the old comments, this class was no longer thread safe with
multi-core, because of the possibility of out-of-order reads and writes.
Use the minimal necessary memory ordering, not the default and maybe expensive
std::memory_order_seq_cst
At least one clicky recording has been seen where many small groups of
samples, a common power in two in size, seem to get displaced rightward.
I suspect out of order reads and writes might have caused that and this commit
might prevent it.
The shortcuts for these commands were changed in commit e01122e841fc25cd004ecea77b1665015700f937 to avoid conflicts with the access keys of menus.
They were changed to Ctrl+Alt+P/N. These aren't very convenient for typing, so this commit changes them to Alt+comma/period.
* commit 'a0bf2892fa20009a798f28387fc0e96bbe3260a0':
Revert "Possibly correct some cases of clicky playback or corrupt recording..."
Revert "Fix compilation on Windows."
Revert "Fixes for new ring buffers..."
Punch and roll from 0.0 deletes the whole track before punch and rolling.
That is unlikely to be what the user intended, since there is then no audio
cue, so disallow it.
Also reduced indentation.
... 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.