1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00
Commit Graph

458 Commits

Author SHA1 Message Date
Paul Licameli
329221b392 Lower more into Init(); ClipMenus uses ClipMoveState opaquely 2020-09-19 19:16:45 -04:00
Paul Licameli
00f761eb5e TrackShifters responsible for snapping; remove a TrackList::Visit...
... Also dependency of TimeShiftHandle on LabelTrack, lately added, is removed
2020-09-19 19:16:45 -04:00
Paul Licameli
eb22892064 TrackShifters decide what parts move or stay fixed...
... for now redundantly with the older logic.

Also shorten a function name to Init
2020-09-19 19:16:43 -04:00
James Crook
5407f92c0c Fix Mac Build.
Brackets for XO were in the wrong place.
2020-09-14 18:56:57 +01:00
James Crook
caf4eadb97 Help button for many warning messages; Restored warning icon.
The error icon was gone because we are now using the ErrorDialog, which didn't have it.  So added back explicitly.  I decided to go with wxART_WARNING rather than wxART_ERROR because nearly all of these present as warnings.
2020-09-14 17:43:28 +01:00
Paul Licameli
a2e22dc17b TransactionScope for performance also when abandoning redo states 2020-09-06 17:05:33 -04:00
Paul Licameli
4ca3e7096f Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
Leland Lucius
542a9a8d98 [Bug 2522] In Macros, Record New Track and Play with a selection do not wait for completion. 2020-08-15 18:03:09 -05:00
Leland Lucius
9bfbf1570b Bug 2522 - In Macros, Record New Track and Play with a selection do not wait for completion. 2020-08-15 16:39:33 -05:00
Leland Lucius
2987896470 Bug 2516 - Windows: "SAVE" button in "Audio / MIDI Device Info" displays "OK" 2020-08-12 14:23:27 -05:00
Leland Lucius
69859eebe4 Play and record now wait in Macros if a regions exists. 2020-08-12 13:56:53 -05:00
Leland Lucius
70fd77e2dc AUP3: Don't prompt user if in batch mode 2020-08-12 08:23:41 -05:00
Leland Lucius
17b4919a2a Remove old CleanSpeech macro commands 2020-08-12 08:12:46 -05:00
Leland Lucius
9d749fef14 AUP3: Fix macro path handling
Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
2020-08-10 17:48:59 -05:00
Leland Lucius
2437aa15be Bug 2491 - Reset Configuration does not reset Extended Import preferences
Better solution...
2020-08-09 01:09:15 -05:00
Leland Lucius
3dba0eeaa1 Bug 2491 - Reset Configuration does not reset Extended Import preferences 2020-08-08 22:39:21 -05:00
Leland Lucius
4044bea36b AUP3: Fix build 2020-08-05 10:31:14 -05:00
Leland Lucius
f92ca33a20 AUP3: Add help button and change wording 2020-08-05 09:55:07 -05:00
Leland Lucius
4d3578b1cb AUP3: No need to include the -wal in space calcs 2020-08-02 08:38:58 -05:00
Leland Lucius
96931a8b0c AUP3: Do not use compacted file if it grows
This can happen because the new file is constructed differently
than the original and SQLite may introduce additional b-tree
pages as a result.
2020-08-02 08:03:41 -05:00
Leland Lucius
c29c6b1b15 AUP3: Small cleanup 2020-08-01 21:40:54 -05:00
Leland Lucius
8943494f8a AUP3: Better space usage calculations
Several improvements in determining how much actual disk space a
sampleblock uses. This allows us to provide how much space will
be recovered when using File -> Compact Project.

In addition, the History window now provides better space estimates.
2020-08-01 04:25:42 -05:00
Leland Lucius
d4627f0daf AUP3: Reduce crash exposure when compacting
There's still the possibility if a crash happens at just the
right time that the project will be named "<project>_compact_back"
so we should probably look for it during startup.

This also changes all "Vacuum" references to "compact".
2020-07-28 23:25:50 -05:00
Leland Lucius
1bbd7b3b52 AUP3: UP-40 Compact Project Done
This time it adds the usage info on the initial dialog as well.
2020-07-27 16:56:31 -05:00
Leland Lucius
5e086041d6 AUP3: UP-40 Compact Project Done
Shows how much space was freed after compaction.
2020-07-27 16:50:18 -05:00
Leland Lucius
e2d6e1cc24 AUP3: Update default/lastused path handling 2020-07-27 14:11:50 -05:00
Leland Lucius
757bc0b183 AUP: Fix duplicate shortcut 2020-07-26 13:18:10 -05:00
Leland Lucius
eb7da50b62 AUP3: Fix capitolization 2020-07-26 13:16:37 -05:00
Leland Lucius
416d3f27de AUP3: Fix includes 2020-07-26 02:32:41 -05:00
Leland Lucius
6fef14dd08 AUP3: Rework Compact Project menu item and AutoRecoverDialog
Plus a couple of fixes that prevent leaving temporary files
after a project is loaded.
2020-07-26 02:01:37 -05:00
Leland Lucius
5bc3ae659c AUP3: Added AUP3 importer and improved progress dialogs 2020-07-15 01:32:48 -05:00
Paul Licameli
06f22e942b More exception-safety for recording...
... Do not call Autosave (which might fail) when recovering from exceptions in
recording, but rely on the last good Autosave that happened during recording.

If dropout labels are needed, then immediately modify the undo history item, but
we can accept it if that modification fails.

Also, be sure NOT to skip Autosave in all other places that push the undo
history.  Make Autosave the default unless otherwise specified.

Finally removed one unnecessary call to Autosave.
2020-07-10 13:46:21 -04:00
Paul Licameli
875e8e0984 Cross project copy data loss (#604)
* Need only CloseLock now, not old Lock and Unlock...

... which were for cross-project cut and paste, but they no longer work and we
need another solution.  So delete much old code.

* Fix dangling reference to AudacityProject completely! ...

... in SqliteSampleBlockFactory: retain ONLY the shared pointer to
ProjectFileIO, then pass that, not project, to constructors of blocks.

completing the work of 127696879d

* Restore part of the Bug2436 fix...

... which needs the non-default arguments to WaveTrack::EmptyCopy that got lost
at d39590cf41

So that pasted WaveTracks refer to the correct SampleBlockFactory and database
for their project

But this is not yet a sufficient re-fix for the bug

* Complete the fix for cross-project copies and 2436...

... by duplicating sample blocks, in Sequence.cpp, when it is wrong just to
share them.

And to determine which case it is, see whether source and destination Sequences
have the same sample block factories when doing Copy or Paste.  Duplicate
when the factories are different.  Otherwise sharing is safe and more space
efficient.

This does the analogous to what DirManager::CopyBlockFile did before commit
d39590c.
2020-07-07 15:41:50 -05:00
Leland Lucius
c04ed76b6b AUP3: Fixes a couple of reported issues
Add the missing "File -> Save Project -> Backup Project..." menu item

Allows "File -> Save Project -> Save Project" to save unmodified
projects.
2020-07-03 14:38:57 -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
b4ce083185 Prevent possible dangling pointers to Project from Clipboard 2020-07-01 18:38:45 -04: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
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
Paul Licameli
da93757401 Remove ImportRaw.h from other headers 2020-06-13 12:19:38 -04:00
David Bailes
ce07da936c Bug 1549: Retrieve Region does not ensure it is visible 2020-06-10 12:43:28 +01:00
Paul Licameli
1bce7c1979 Disambiguate "Silence" 2020-06-06 15:14:42 -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
James Crook
fb8214afc9 Reset session data directory on a Reset Configuration. 2020-06-03 13:28:47 +01:00
David Bailes
8e6c5c0027 Tools menu: fix duplicate access key 2020-06-03 08:20:37 +01:00
James Crook
3a537540cc Move ResetConfiguration from Help to Tools menu.
Requested by Peter, and I agreed.
2020-06-02 18:01:18 +01:00
James Crook
bc621158b8 Update OnResetConfig
Now it resets the toolbars, and fixes three common 'stuck-in-a-mode' issues.

Paul wrote: "I would move that function [OnResetToolBars(context)] into ToolManager.cpp so it can be called from ToolBarMenus.cpp and HelpMenus.cpp, with neither of those two dependent on the other."
2020-05-31 12:22:08 +01:00
James Crook
0417b2bf41 Bug 2348 - Residual. Don't select new tracks. 2020-05-30 11:54:21 +01:00
James Crook
d6f8410d56 Bug 2408 part 2.
Only modify label tracks with sync lock, when they are also part of the sync lock group.  This corrects a problem where edits in a wave track culd affect later label tracks that were not in its group.
2020-05-29 22:37:49 +01:00
James Crook
6b1b9cc088 Bug 2408 - A region label gets split on inserting audio when Sync-lock is turned on 2020-05-29 22:27:04 +01:00
James Crook
6d49228d65 Bug 2439 - Mix and Render to New Track selects left channel of new stereo track 2020-05-29 21:13:37 +01:00