... instead, all additions of items are required to specify flags explicitly.
Reliance on a default setting didn't save much in characters of code, and
has led to subtle errors before when rearranging menus.
... Just one CommandManager::AddItem overload, instead of two plus two
overloads of AddCheck. Also remove SetLongName. Use an options structure
instead for all those distinctions.
Also simplify all the repetition of equal flag and mask values. It's only in
four cases where we need to make them different.
Problem: up to about 300ms was intermittently truncated from the end of recording.
The bug was introduced by commit a0256e9.
The fix: in this commit, the line:
the line:
mRecordingSchedule = {}; // free arrays
was added to the lambda in the definition of cleanup at the start of AudioIO::StopStream()
If this line is changed to:
mRecordingSchedule.mCrossfadeData.clear(); // free arrays
then this has been found to fix the bug, and the vector is still cleared.
Clearly, the reinitialization of one or more of the other data members of mRecordingSchedule was causing the bug.
Which of the these reinitializations are the problem, and why is not known, and due to the nature of the problem could well take some time to find out.
Some former 'On' functions have been renamed 'Do' since they didn't directly handle the menu item. Some functions that used 'Context' now use 'Project'.
... This forces a better placement of state variables in the appropriate
classes.
In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
Flipped some conditions and used if else-if to reduce the indentation in code.
This makes the code more readable. No change in functionality.
Also created UpdateTimePositions() and made some bool functions void.
new variable mMaxFramesOutput used to communicate positional change.
... This string appears when you enter a positive, invalid value for peak
amplitude in the Normalize effect. It didn't look right with periods (a space
was left before the first period). Let's use parentheses instead.
AudioIO.cpp has nearly 6000 lines and needs to be broken up into separate aspects.
The main point of the new split is to better separate the time critical callback code (that runs in the portaudio thread) from the code that interacts with the disk (that runs in the Audio Thread).
Menus.cpp is over 10,000 lines. The main point of the split is to make possible a new .cpp file for MenuCreator, which is responsible for the creation of the menu bar, and which contains the near 2,000 line function MenuCreator::CreateMenusAndCommands()
The menu handlers are also (better) separated from the menu management.
We ask 17 times for different rates, and for some drivers that is too much of a flood.
Workaround is to use a small delay between requests.
Only happens at start up, so is acceptable to just always do it.