1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 14:18:53 +02:00

6743 Commits

Author SHA1 Message Date
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
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
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
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
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
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
James Crook
939b967497 Refactor AudioIO::Callback()
This code had got ridiculously long (for a fast callback function) and needed to be broken up into smaller clearer named functions.
2018-10-11 18:08:42 +01:00
James Crook
e20a98588c Replace pointless looping by 'if'
The for loop was only to test if *some* track was selected, and its body only needs to be executed once.
Note that an empty IteratorRange is false and one with something in it is true.
2018-10-11 12:04:43 +01:00
James Crook
15a3ea7763 Bug 2010 - Scriptables: SelectTracks and Select incorrect for stereo tracks 2018-10-11 11:29:53 +01:00
James Crook
7e5a716e65 Fix C4458 Warnings
C4458 is 'Declaration hides class member'
2018-10-10 19:46:25 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
James Crook
5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Steve Daulton
5d34d022a5 Add rms.ny to Audacity bundle
Tidy translation code in init.lsp
Include rms.ny in Makefile.am
Add rms.ny to Linux package
Update Makefiles with: autoreconf --force --no-recursive
Add rms.ny to mac build
Add rms.ny to Windows build
2018-10-08 18:55:46 +01:00
Paul Licameli
14fe11f4d4 Bug2008: There was error in stereo Contrast calculation, at aee4005 2018-10-07 10:29:58 -04:00
Paul Licameli
3f928a25b0 Bug2004: Opening Mixer Board with a Note track crashed...
... Just one null check was needed, but I also add another, and use a
wxWeakRef pointer, for more safety.
2018-10-06 11:20:30 -04:00
Paul Licameli
e6e4f44c81 Bug1997: Split Stereo Track and Split Stereo to Mono were doing nothing 2018-10-05 22:09:10 -04:00
Paul Licameli
b5a7b67cb7 Fix some crashes in time-shift 2018-10-04 12:02:51 -04:00
Paul Licameli
92cceaf599 Fix usage of InconsistencyException 2018-10-04 11:44:46 -04:00
Paul Licameli
90e2da7f14 Fix uses of TrackList::GroupChannels in Mix and effect preview 2018-10-04 11:34:14 -04:00
Paul Licameli
df1103822e Don't crash in Nyquist tools with mOutputTracks undefined 2018-10-04 10:56:03 -04:00
Paul Licameli
75918918c4 Correct template parameters to std::iterator base of TrackIter...
... so that std::reverse_iterator<TrackIter<T>> works right, not making a
subtle error of return of reference to a temporary in its operator * with some
compilers.
2018-10-03 22:47:21 -04:00
Paul Licameli
50f2b0e860 Bug1995: Fix drawing of stereo tracks, bug introduced at 0c0c2c0 2018-10-03 17:19:15 -04:00
Steve Daulton
8880e1b929 Fix missing initialization from a17af37 2018-10-03 21:08:27 +01:00
Paul Licameli
cc74b0273f Fix return of reference to temporary object (that's bad!) ...
... This might be the reason for Linux crashes when playing-at-speed.

This was a bad thing to do with any compiler -- not to be blamed on
possible compiler bugs.

There was a warning about this in the XCode build.
2018-10-03 14:26:05 -04:00
David Bailes
348e7868b8 1991: On Windows, nyquist effects and analysers slower than on 2.2.2
Problem: profiled the limiter effect, and found that wxGetLocalTimeMillis() in ProgressDilaog::Update was taking up a lot of time.
The slow down of the nyquist effects and analysers was introduced by the switch to wxWidgets 3.1.1, so presumably there was some change to the implementation of wxGetLocalTimeMillis()

Fix: Use wxGetUTCTimeMillis() instead of wxLocalTimeMillis() in ProgressDialog.cpp. This is much faster on Windows, and wxWidgets recommend its use to due wxGetLocalTimeMillis() being affected by start/end summer time (daylight saving time).
2018-10-03 19:18:41 +01:00
Paul Licameli
0a55b27d2d Bug1994: Crashes in append-record...
... The crash happened in drawing code.  The recently submitted but long
developed rewriting of track and channel iterations wasn't all reconciled
with the early 2.3.0 development relating to temporary track objects for
display purposes, which was for fixing the interactions of recording and undo.
2018-10-03 13:21:15 -04:00
Pokechu22
565fef2ba9 Bug 1832: Fix adjusting time track when in logarithmic scale
The typo that caused this appears to have been introduced when this code was restructured in 9e0010ec5f.
2018-10-02 21:13:23 -04:00
Steve Daulton
a17af37c1e Fix bug 1992 2018-10-02 22:40:10 +01:00