These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented. Changed to auto.
I added a new flag, HasWaveDataFlag that checks not only for the presence of a WaveTrack but also for audio actually in it. This is now applied to the Scrub and Seek menu items, with the result that they grey out in the menu, and their buttons are dulled on the toolbar, if there is no audio.
This also makes it clearer in the code when we are dealing with a Toolbar ID (for the scrubbing toolbar) and when we are dealing with a button ID (for enabling/disabling the scrub ruler).
... I believe this list of four places is exhaustive.
There are many, many more safe narrowings that I examined.
This resulted from changing the definition of sampleCount in my builds so that
narrowing conversions failed to compile without some fixes, and I examined and
fixed every place.
The rest of that work is not yet shared.
Stream time from the scrubbing audio (which had not started) was coming out as a large negative value. That in turn led to an out of range selection starting and ending at that value. Negative stream times now treated as zero when stopping audio. This does mean that the (fringe) case of stop and set cursor with audio playing to the left of zero, if you are able to do that, will likely set the cursor at zero rather than at the negative time end point. I think that is probably OK, even good.
...They may never have been large enough to matter, but some seek offsets into
files were written as 64 bits but read back as only 32. It ought to be
consistent.
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.
This introduces a new variable, mStopIfWasPaused (default true). Actions which require AudioIONotBusyFlag will now stop the audio, if audio was busy but paused and attempt to continue.
We could perhaps make mStopAudioIfWasPaused into a preference, but I don't think we need to keep even the option of the old behaviour.
1) Enable scrub bar by default, to increase visibility of the new feature.
2) Add 'Enable/Disable Scrub Bar' to QP right click menu.
Did not remove Scrubbing from transport menu, as to do so disables scrubbing.
Vital feature of MixerBoard as the point is to be able to have large sliders.
The problem was that the slider background was cached in a bitmap, and that cached image was not being refreshed on a resize.
Baselines of text produces by ShuttleGuiBase::AddPrompt and ShuttleGuiBase:AddUnits are different.
Simple fix of changing a style. Presumably this was a typo.
Doing BalanceInfoDel in this delayed fashion will be needed when the other
call to it is eliminated, as shared_ptr simplifies the management of BlockFile
and makes the many calls to Ref and Deref disappear.