Now cut-preview and looped play revert to using the old fixed speed play-at-speed.
Unfortunately Scrubbing does not (yet) support looped play or cut-preview.
In particular, device toolbar previously could be made ridiculously small.
Also in the default configuration it takes a whole line, so we now use that space in its initial size.
Mixer Toolbar initial size was a little small. Now it matches the Transport Toolbar width.
Meter Toolbar initial size was too small.
Transcription Toolbar was a little too small. Better to start out slightly wider than previously.
Worth doing for users with wide screens, who want to use the toolbar at full screen width.
Both toolbars can now expand to a little over 2000 pixels width.
Note that the max sizes affect what is drawn. You can make the toolbars wider still, but the sliders inside them won't continue to lengthen.
I moved 'Fit()' from ToolBars into MeterToolBar, because it is a workaround for an incorrect size calculation by MeterToolBar. MeterToolBar is sized as if there is no resizer, so when there is one, the toolbar needs to be expanded (using Fit) to accommodate the resizer.
I also set the min size of MeterToolBar to 150, so that some meter will appear, even if Toolbar shrunk to the minimum.
This adds a new preference to Playback prefs, VariSpeedPlay, on by default, which makes it possible to vary the playback speed slider whilst audio is playing using play at speed. The code uses the Scrubbing playback engine.
This code is not final, but is already useful. Known issues:
1- Playback does not stop and pop-up the Play at Speed button at the end of playing the selection.
2- The scrub widget shows uselessly on the scrub ruler when in Play at Speed mode and the status bar proclaims 'Scrubbing'.
3- At low speeds the playback is clicky, with VariSpeedPlay, even if no changes to speed are being made.
If we can't fix both 1 and 2 by 2.3.0 release time, VariSpeedPlay will be made false by default.
Change the accessible name of the combo box from "Spectral selection" to "Show". It's less verbose, and brings it into line with the "Show" combo box in the Selection toolbar.
... I observed that you couldn't, with a Mac Mini connected to a monitor;
two output devices (monitor and built-in) but no input device (there is no
built in mic)
... 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.
... 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.
The third argument of ASlider constructors already provided suitable accessibility names. So removed the unnecessary calls to SetName which set unsuitable names.
... 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.
The worst symptoms of this are fully fixed.
1: The device info now uses all the space in the toolbar, no matter how the toolbar is resized.
2: The undocked toolbar can now be moved around repeatedly without changing size at all.
There is a small residual - a much toolbar size change of a few pixels on docking. The contents though still fit nicely. The 'incredible' part of this bug is gone. I'd like us to close this bug as the residual of a few pixels change in the toolbar size on repeated docking and undocking scarcely matters.
The main change in wxWidgets for the setting of accessibility names is:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)
Before this change, with wxUSE_ACCESSIBILITY set to 1, for wxWindow and all the classes derived from it, wxWidgets automatically created accessible objects to handle accessibility itself. Because the way wxWindowAccessible::GetName() was written, the accessibility names of lots of windows and controls had to be set using SetName().
After the change, by default, the accessibility of instances of these classes is handled by Windows. Where the accessibility of a control is handled by Windows, then the accessibility name is automatically set to so the appropriate value. However, an accessible can still be set using SetAccessible() then wxWidgets handles the accessibility for this object.
So for many controls we can just leave Windows to set the accessibility name. However, for controls which don't have any visible labels, or where we want to accessibility name to different from the visible text, then we have to set an accessible object for that control, and then call SetName(). The Class WindowAccessible can be used for this purpose. And for custom widgets, like the TrackPanel, and the NumericTextCtrl, SetAccessible() still has to be called, since they need bespoke accessible objects
So in the cases where we want the accessible name to be different from normal, we now need to explicitly set an accessible object. (Before, this wasn't needed, as accessible objects were automatically created.).
Some notes of the fixes included in this commit:
1. The fixes cover the main window, preferences, and built-in effects. Other fixes will follow.
2. In ShuttleGui, I've set accessible objects for wxTextCtrls and wxSliders. So all of these widgets still need the name set. This was done because there are a lot of instances where these controls need non standard accessibility names, and so it saves having to put lots of SetAccessibles throughout the code.
3. For wxPanel, Windows picks up the accessibility name from the label, and so SetLabel() can be used instead of SetName(). This is just as well, since for windows that contain other windows or controls, setting WindowAccessible as the accessibility object breaks the accessibility tree.
Note that at some stage a lot of calls to SetName() can be removed from the code as they are no longer needed, but it might be better to leave them there for the moment, just in case they are unexpectedly needed.
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.