1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-17 16:50:26 +02:00

8789 Commits

Author SHA1 Message Date
Leland Lucius
48287e9b0d AUP3: Provides relief from slow shutdown
This is a hack to fix the long delay at Audacity shutdown
after editing large files and tossing the results (not
saving).
2020-07-02 22:08:39 -05:00
Paul Licameli
127696879d
Unitary changes (#599)
* Define SampleBlockFactory replacing static members of SampleBlock...

... This will become an abstract base class

* Sequence and WaveTrack only store SampleBlockFactory not Project...

... This adds a dependency from Track to SampleBlock which temporarily enlarges
a cycle in the dependency graph

* Register a global factory of SampleBlockFactory...

... so that later we can make an abstract SampleBlockFactory, separate from the
concrete implementation in terms of sqlite, and inject the dependency at startup
avoiding static dependency

* New concrete classes SqliteSampleBlock, SqliteSampleBlockFactory...

... separated from abstract base classes and put into a new source file,
breaking dependency cycles, and perhaps allowing easy reimplementation for other
databases in the future.

Note that the new file is a header-less plug-in!  Nothing depends on it.  It
uses static initialization to influence the program's behavior.

* Compile dependency on sqlite3.h limited to just two .cpp files...

... these are ProjectFileIO.cpp and SqliteSampleBlock.cpp.

But there is still close cooperation of ProjectFileIO and SqliteSampleBlock.cpp.
This suggests that these files ought to be merged, and perhaps ProjectFileIO
also needs to be split into abstract and concrete classes, and there should be
another injection of a factory function at startup.  That will make the choice
of database implementation even more modular.

Also removed one unnecessary inclusion of ProjectFileIO.h

* Fix crashes cutting and pasting cross-project...

... in case the source project is closed before the paste happens.

This caused destruction of the ProjectFileIO object and a closing of the sqlite
database with the sample data in it, leaving dangling references in the
SqliteSampleBlock objects.

The fix is that the SqliteSampleBlockFactory object holds a shared_ptr to the
ProjectFileIO object.  So the clipboard may own WaveTracks, which own WaveClips,
which own Sequences, which own SqliteSampleBlockFactories, which keep the
ProjectFileIO and the database connection alive until the clipboard is cleared.

The consequence of the fix is delayed closing of the entire database associated
with the source project.

If the source project is reopened before the clipboard is cleared, will there
be correct concurrent access to the same persistent store?  My preliminary
trials suggest this is so (reopening a saved project, deleting from it, closing
it again -- the clipboard contents are still unchanged and available).
2020-07-02 18:11:38 -05:00
Paul Licameli
1fcb77ebce
Unitary fixes (#598)
* Eliminate unneeded back-pointer to project from non-wave Tracks...

... now that DirManager is gone

* Remove unused declarations

* SampleData::mProject was not used

* Correct ProjectFileIO::GetLibraryError

* Remove unnecessary #include directives
2020-07-02 11:42:25 -05:00
Paul Licameli
b4ce083185 Prevent possible dangling pointers to Project from Clipboard 2020-07-01 18:38:45 -04:00
Leland Lucius
8ea07572c1 AUP3: Several fixes
These mainly address the bugs that Steve reported and a couple
more I found along the way.

Corrected ProjectFileIO::GetMinMaxRMS() - It was still using the
original method of keep all block data in memory.  I missed it
when I redid everything.  Fixes his Amplify crash.

Temporary filenames should no longer be shown to the user.

Resaves will no longer present a Save As dialog.

Cleaned up duplicate pathname handling in ProjectFileIO.

Returned proper errors when loading a project
2020-07-01 13:26:20 -05:00
James Crook
299710f0a9 Add comments to document the SQL. 2020-07-01 14:55:06 +01:00
James Crook
bc50e21532 .aup3 Tweaks
- SQLite added to libs in readme.txt
- User message 'aup not associated' updated to 'aup3'
- Typos strind -> string, in -> is
- No translation of debug message
2020-07-01 12:59:38 +01:00
Leland Lucius
d39590cf41 AUP3: First round of updates
!!! THERE WILL NO DOUBT BE BUGS !!!

This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.

One big thing right now is that it will NOT load pre-aup3
files.  An importer is on the way for that.
2020-07-01 02:30:18 -05:00
Leland Lucius
b1beb20ae9 AUP3: Remove obsolete audio file cache 2020-07-01 01:14:10 -05:00
Leland Lucius
cbf1bb558e AUP3: Removes OD code related to project file handling
This removes all of the OnDemand code embedded throughout
    the main codebase. Individual files related specifically
    to OD have been left in place, but removed from the build.
2020-07-01 01:14:05 -05:00
Leland Lucius
2fbfd3e0a5 AUP3: Add SQLite to the project 2020-07-01 01:13:37 -05:00
Henric Jungheim
639a82a4a0
Be more careful when handling grid keyboard navigation. (#589)
If the grid is empty or does not have a selected cell, the current
row and column must still maintain these class invariants:
   -1 <= current_row < rows
   -1 <= current_column < columns
    if either current_row or current_column is -1, then the other
       shall also be -1

wxGrid uses wxGridNoCellCoords to test for current_row == -1 &&
current_column == -1.  We treat the case where only one
of the coordinates is -1 as if both are -1.
2020-06-29 16:34:50 +01:00
Antonio P
7d2aad8c6a
Update audacity.desktop.in (#583)
Spanish (es) traslation added
2020-06-29 16:32:44 +01:00
Grzegorz Pruchniakowski
3fa7e76ade
kr => ko in Korean (#585)
kr => ko in Korean
2020-06-29 16:30:48 +01:00
James Crook
d42f0e327c Start development of 3.0.0 2020-06-28 11:02:43 +01:00
James Crook
191704cc07 BUILD_LEVEL set to 2, ready for release. 2020-06-19 15:26:41 +01:00
Paul Licameli
3feda9e189 Remove CommonTrackPanelCell.h from Track.h 2020-06-17 14:54:36 -04:00
David Bailes
a1cb9c154a Extended import prefs: minor accessibility fixes
In the importer order list, ensure the selected item is also the focus.
2020-06-17 10:35:05 +01:00
Leland Lucius
3276234ae8 Bug 2484 - OPUS import fails 2020-06-16 09:05:29 -05:00
Leland Lucius
456177a66d Bug 2470 - Linux/Mac: Modules may not be found if earlier version failed 2020-06-15 20:06:33 -05:00
Leland Lucius
7892e95d39 Fix off-by-one test reported by Henric Jungheim 2020-06-15 15:53:38 -05:00
Leland Lucius
e7e27aa7e9 Bug 2478 - Windows: with an empty rules list in "Extended Import" prefs - Tab or Home crashes Audacity 2020-06-15 08:55:38 -05:00
David Bailes
cc1c395b33 Bug 2477 - visibility of newly added focused track
Problem: Newly added track which is set as the focus can be only partially visible or invisible.

If TrackPanel::OnEnsureVisible is called after a new track has been added, then in that function the line:
mListener->TP_ScrollUpDown(height);
can lead to incorrect results, as the vertical scrollbars have not yet been updated to take into account the additional track.

Fix:
Update the scrollbars in TrackPanel::OnTrackListResizing().
2020-06-15 14:45:15 +01:00
Leland Lucius
adbc1ba4b7 Bug 2467 - Modules are not available for "Portable" Audacity 2020-06-15 08:26:46 -05:00
Leland Lucius
f3d3211558 Bug 2470 - Linux/Mac: Modules may not be found if earlier version failed 2020-06-15 00:51:27 -05:00
Leland Lucius
4334a656b0 Bug 2467 - Modules are not available for "Portable" Audacity (edit) 2020-06-14 23:20:44 -05:00
Paul Licameli
e4260e2e95 virtual dtors should be non-inline 2020-06-14 21:00:06 -04:00
Leland Lucius
87cae3f0c8 Mac: AudioUnit effects are not applied if you initially use the preview 2020-06-14 13:58:30 -05:00
Paul Licameli
04a0eb4370 Fix comments 2020-06-14 13:44:52 -04:00
Paul Licameli
37714a0db7 Remove portmidi and porttime from other headers 2020-06-14 12:32:28 -04:00
Paul Licameli
3869a8f460 Remove allegro.h from other headers 2020-06-14 10:32:16 -04:00
Paul Licameli
da93757401 Remove ImportRaw.h from other headers 2020-06-13 12:19:38 -04:00
Paul Licameli
a7408a7f80 Remove TimeWarper.h from other headers 2020-06-13 11:22:41 -04:00
Paul Licameli
6f402b3071 Remove expat.h from XMLFileReader.h 2020-06-12 14:02:37 -04:00
Paul Licameli
c84a2d295d Remove portaudio.h and portmixer.h from AudioIOBase.h 2020-06-12 11:39:18 -04:00
Paul Licameli
4ac96376bb Fix exception at startup on some Linux builds...
... Initializing Scrubber::mWindow but we don't use that any more.

It became unused at commit a3b434be1cd42ff7c99821de4ea52c0945cb0baa
2020-06-11 21:19:23 -04:00
David Bailes
ce07da936c Bug 1549: Retrieve Region does not ensure it is visible 2020-06-10 12:43:28 +01:00
James Crook
4267ba0490 Bug 2473 - Linux: Numbers on meters have opaque backgrounds 2020-06-09 16:36:15 +01:00
SteveDaulton
fdc978e871 Fix Bug 2469 2020-06-09 13:04:46 +01:00
Fishbeck, John
d5266912ef "and" -> && "or" -> ||
So Audacity compiles on older Visual Studio 2017.
2020-06-08 22:32:58 +01:00
Paul Licameli
a085057b66 Delay creation of tool docks and bars...
... after construction time for ToolManager, so that ToolManager can be
constructed earlier than ProjectWindow, and therefore the unspecified sequence
of invocation of factories of attached objects in the project won't lead to a
crash on any platform
2020-06-08 15:37:12 -04:00
Carlo Bramini
339549d23d
[WIN32] This inline ASM is supported only by MSVC. (#563) 2020-06-07 12:49:33 -05:00
yam
3b71d1fc1e Bug 2465 - Treble height Selection Toolbar 2020-06-07 01:15:39 -05:00
Paul Licameli
1bce7c1979 Disambiguate "Silence" 2020-06-06 15:14:42 -04:00
Paul Licameli
782ef138e0 Bug2431 residual: Restore commit 5e8cfb0...
... as urged by Leland.  It is really needed for a more complete fix.

This reverts commit 9894abc4f4477dee88022415a919adcfe96e2e80.
2020-06-06 14:59:32 -04:00
James Crook
6f20ca2403 Fix ResetConfiguration Device Toolbar Size
The device toolbar was coming out too short after a 'ResetConfiguration'.
The upgrade detection process was messing with it.  The fix is to
remember what version we are on.
2020-06-05 21:10:38 +01:00
Paul Licameli
4a56af43aa Bug2442 residual: Review AudacityException classes...
... Have copy constructors only (no moves); disallow all assignments
2020-06-05 13:48:53 -04:00
David Bailes
13ec3300a9 Bug 2471 - Mix Stereo down to Mono fails if space at start of track
Fix:
In the constructor for Mixer, the start and end times should be in seconds, not sample numbers.

Also fixed in passing, in computing end time of a track, the max of the two channels should be used, rather than the min.
2020-06-05 14:33:45 +01:00
Paul Licameli
278b40c50d Bug2442: Windows crash when import exhausts disk space...
... Fixed by changing a move constructor to a copy constructor for the
exception object.  Not sure why that should be needed, according to the C++
standard, but so it is with the MSVC compiler.
2020-06-05 00:00:48 -04:00
Leland Lucius
e861598f99 Bug 2470 - Modules may not be found if earlier version failed 2020-06-04 15:55:24 -05:00