1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 06:09:47 +02:00

9304 Commits

Author SHA1 Message Date
Paul Licameli
fc1bc7994e Remove CommandManager::SetDefaultFlags and related 2018-10-17 23:14:55 -04:00
Paul Licameli
a1bd9062ae Remove dead code; so that all remaining calls to NewIdentifier...
...are followed by a setting of flags and mask
2018-10-17 23:13:56 -04:00
Paul Licameli
63f20f3405 CommandManager::AddItemList requires flags 2018-10-17 23:13:56 -04:00
Paul Licameli
742e578d49 Flags in AddItem (and AddCommand) may not be NoFlagsSpecified 2018-10-17 23:13:56 -04:00
Paul Licameli
db997f8ecd Flags argument of AddItem (and AddCommand) is obligatory 2018-10-17 23:13:56 -04:00
Paul Licameli
d46f3a9e63 Simplify menu-building calls...
... 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.
2018-10-17 14:21:05 -04:00
Paul Licameli
f6478acb1c Just spaces 2018-10-17 14:14:21 -04:00
Paul Licameli
596eefe675 CommandManager::Options also specified the long name 2018-10-17 13:49:43 -04:00
Paul Licameli
cfe7ddcf55 struct CommandManager::Options lets us fold AddCheck into AddItem 2018-10-17 13:32:39 -04:00
Paul Licameli
de4132d66c Reorder accel argument and unify two overloads of AddItem 2018-10-17 13:32:36 -04:00
Paul Licameli
c376ffb165 Simplify calls to SetDefaultFlags: default mask to equal flags 2018-10-17 13:21:00 -04:00
Paul Licameli
42aef9f3e8 Mask != flags is unusual: simplify most AddItem/AddCheck...
... and the no longer used AddCommand.

There are only four exceptions, all using NoAutoSelect in the flags and not in
the mask.
2018-10-17 13:20:58 -04:00
Paul Licameli
80437582d8 Change comments that confused audacity.pot hints 2018-10-17 12:53:25 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
88c67c46f3 Unify the two overloads of CommandManager::AddCheck 2018-10-17 12:53:25 -04:00
Paul Licameli
fef9e2abac Remove some unused things 2018-10-17 12:53:25 -04:00
David Bailes
bb7b95023f Bug 2009: Windows+Linux: Intermittent truncation of the end of a recording
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.
2018-10-17 14:31:43 +01:00
Paul Licameli
a7df004a88 Don't include Project.h or ODTask.h needlessly in other header files 2018-10-16 17:36:38 -04:00
Paul Licameli
2fafe5c328 Fix Linux build 2018-10-16 17:35:15 -04:00
Paul Licameli
fc99f61945 Fix compilation of mod-nyq-bench 2018-10-16 17:17:32 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
a3fc5894fb Fix obsolete comments in Menus.cpp...
... In particular, some handlers have been in Scrubbing.cpp and MenusMac.cpp
for a few versions now, so we must soften "all" to "most"
2018-10-16 16:34:09 -04:00
James Crook
708cbe173e Consitently use On<something> iff it is a direct menu handler.
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'.
2018-10-16 15:15:35 +01:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... 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.
2018-10-16 13:01:22 +01:00
James Crook
d693b36bdb Shorten AudioIoCallback::FillOutputBuffers()
Mainly by moving functions to live outside this function.
2018-10-16 13:01:22 +01:00
James Crook
45069794f3 Reduce indentation in AudioIO
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.
2018-10-16 13:01:22 +01:00
James Crook
51b3076786 Fix include path 2018-10-16 13:01:22 +01:00
Steve Daulton
cb55164c43 Add Project Rate to SetProjectCommand 2018-10-15 23:51:41 +01:00
Paul Licameli
6ca721b03a Fix a string again...
... 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.
2018-10-15 12:59:02 -04:00
Paul Licameli
ef97ce88ca Correct more double spaces 2018-10-15 12:54:44 -04:00
James Crook
d2578b9eaa Remove some duplicated code in AudioIO 2018-10-14 22:45:41 +01:00
Darrell Walisser
651957f8c2 fix bug compiling on Linux/gcc-4.9 with wxwidgets 3.0.2 2018-10-14 11:57:58 +01:00
Darrell Walisser
5dfff70f5b Fix OpenMP build 2018-10-14 11:34:37 +01:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01:00
Imre Kristoffer Eilertsen
218eb67316
Fixed 4 spelling errors 2018-10-14 06:33:18 +02:00
Imre Kristoffer Eilertsen
6f546de929
Updated the Norwegian translation quite heavily 2018-10-14 03:55:07 +02:00
James Crook
cdf9d63760 Bug 1979 - Activate Paul's fix for Windows too.
I tested the basics, and no block files were lost.
2018-10-13 22:02:09 +01:00
James Crook
ffa67d2b1e Split AudioIO into two classes
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).
2018-10-13 21:38:35 +01:00
James Crook
26086a4142 Split MenuCommandHandler into three classes.
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.
2018-10-13 21:38:34 +01:00
Paul Licameli
529e1e2afb Bug1979 partial: Faster first-time save, if possible, on Mac and Linux 2018-10-13 13:56:05 -04:00
Paul Licameli
cbe0ea84c1 Define FileNames::HardLinkeFile, but nonfunctional on Windows 2018-10-13 13:18:17 -04:00
Paul Licameli
04b5054ad1 Reorganize commit/rollback of SetProject, prior to fixing bug1979 2018-10-13 12:55:55 -04:00
Paul Licameli
e87e15f489 Proper deferring of DirManager's commit steps when saving-as 2018-10-13 12:55:29 -04:00
Paul Licameli
ec506ab52b Define DirManager::ProjectSetter so that commit steps can be deferred 2018-10-13 12:55:29 -04:00
Paul Licameli
0db0c6e0d5 Reorganize some commit logic in DirManager::SetProject 2018-10-13 12:55:29 -04:00
James Crook
555345392e Fix Pa_IsFormatSupported query flood (from Max Maisel)
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.
2018-10-12 15:59:27 +01:00
James Crook
3ddb536a8e Fix eu_ES.po revision date.
XCode project gave a warning about the broken revision date.
2018-10-12 12:17:11 +01:00
James Crook
60b2dc720e Fix incorrect wxASSERT
Also update comments to explain.
2018-10-12 10:08:31 +01:00
Paul Licameli
297f3b4d84 Fix another mistake in iteration over channels in src/commands 2018-10-11 21:40:38 -04:00
James Crook
494ab4eafe Make AudioIO::Callback() code shorter
Use subroutines, wxClip and cut out some dead code.
2018-10-11 19:58:21 +01:00