1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00

12365 Commits

Author SHA1 Message Date
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
12f0c6ee17 AUP3: Write doc to autosave table when compacting temporary projects
This keeps them temporary if they need to be recovered.
2020-07-26 03:09:12 -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
674cfe68c9 AUP3: Offer the active project name for Save Backup
This provides a "template" for the user to modify.
2020-07-25 20:48:15 -05:00
Leland Lucius
c1884349d5 AUP3: Don't delete sample blocks prematurely
The wrong sample blocks would be deleted at close in step 6:

1) New Project
2) Save and name
3) Import one stereo MP3 (about 6 minutes)
4) Save, close and re-open
5) Apply Bass and Treble to the track using real-time preview
6) Save, close and re-open
7) Message Failed to retrieve sample block
2020-07-25 20:03:23 -05:00
Leland Lucius
03762d0ca3 AUP3: Fix unopened project file 2020-07-25 18:47:30 -05:00
Leland Lucius
8f1e52c1c2 Fix Windows build when not using precompiled headers
Should we turn of precompiled headers in our Release builds???
2020-07-25 15:34:33 -05:00
Leland Lucius
e07320be9e Fix Windows build 2020-07-25 13:04:48 -05:00
Leland Lucius
71b4e932ad Fix debug/release builds on Mac 2020-07-25 03:40:15 -05:00
Leland Lucius
df8b7f52ce AUP3: Let's try using just the active projects list 2020-07-23 21:30:09 -05:00
Paul Licameli
a8fd6c6ce8
Preliminaries for grouped block deletion (#628)
* Change usage of AutoCommitTransaction::Rollback...

... It is the more useful pattern (as in many finally blocks) for the failure
path in the destructor (which rolls back) to be the default, but an explicit
call must inform it of success.

This corrects the early return paths in Effect::DoEffect().

Throw inconsistency exception if Commit() is called again after having been
called once, successfully

Also remove a friend declaration

* UndoManager's interface uses consistent 0-based indexing of states...

... Returned by GetCurrentState() and used by SetStateTo(),
GetLongDescription(), GetShortDescription()

* SampleBlock::GetBlockID is const

* Generalized function to visit sample blocks used in a TrackList...

... Eliminating some duplication; put it in WaveTrack, not Track, to avoid
a dependency cycle.

* Eliminate more repetition with BlockSpaceUsageAccumulator

* Function to delete all blocks of/not-of a given set in one command
2020-07-23 11:17:29 -05:00
Paul Licameli
d677bead7a
Win: assertions on project close shouldn't crash displaying the dialog (#629) 2020-07-23 11:16:02 -05:00
SteveDaulton
c7c679ffed Bug 2507 Nyquist fails if track or project name contains quotes 2020-07-23 16:57:38 +01:00
Paul Licameli
3f68d0f1cd Fix inverted assertion condition 2020-07-23 11:32:20 -04:00
Paul Licameli
5bc2cb991f Do debug check for closing of DB before Project destruction safely...
... It wasn't safe, on some platforms, because the sequence of destruction
of ProjectFileIO and ConnectionPtr is unspecified.  It is safer that
ConnectionPtr just checks itself, not that ProjectFileIO fetches it again.
2020-07-23 11:06:50 -04:00
Leland Lucius
676af8ce38 Remove unwanted files 2020-07-23 09:00:05 -05:00
Leland Lucius
b8f9efa0d9 AUP3: Fix build 2020-07-23 01:58:26 -05:00
Leland Lucius
a1e83c141a AUP3: AutoRecoveryDialog experiment
Looking for feedback...
2020-07-23 01:19:29 -05:00
Paul Licameli
a3fcd611b5
Dependency cleanup (#627)
* DBConnection doesn't use ProjectFileIO or need friendship...

... Instead, it is given its own weak_ptr to the project

* Demote the bypass flag into DBConnection...

... So SqliteSampleBlock needs ProjectFileIO only to get the DBConnection

* Accessor functions for the connection objects for SqliteSampleBlock

* Another level of indirection to get to the DBConnection object...

... The document holds the unique_ptr to DBConnection in an attached object;
later we want the SqliteSampleBlockFactory to locate the same pointer without
using ProjectFileIO

* SqliteSampleBlock and its factory don't use class ProjectFileIO...

... Instead they share a pointer to the pointer to the current DBConnection.

This means they no longer know how to invoke the lazy opening of that
connection.

So just require that this be done before any operations on blocks happen.  If
it hasn't, throw and let the application recover.

* ProjectFileIO no longer needs weak_ptr to Project for safety...

... so eliminate much ugliness from 127696879dcc5ca687ec50a4ccef7acbed563926

* Move DBConnection to new files...

... And SqliteSampleBlock does not depend on ProjectFileIO.

* SampleBlock.h doesn't need ClientData.h

* Function ProjectFileIO::Conn() isn't needed
2020-07-23 01:04:46 -05:00
Leland Lucius
38e830edf0 AUP3: Remove unused methods 2020-07-22 20:34:49 -05:00
Leland Lucius
7bb2417db3 AUP3: Fix flushing of tracks/clips in AUP importer 2020-07-22 14:40:14 -05:00
Leland Lucius
0c14e613c7 AUP3: Fix stupid mistake
Thanks for spotting it Paul.
2020-07-22 13:39:01 -05:00
Leland Lucius
6f771d1783 AUP3: Fix previous commit and rework db handling
This moves direct handling of the sqlite3 DB handle into it's own
class, along with the checkpointing thread and prepared statement
cache.
2020-07-22 11:41:03 -05:00
Leland Lucius
7e9a3f49b8 AUP3: Wrap effect processing in a transaction
This is solely for performance reasons and has
nothing at all to do with recoverability.
2020-07-21 16:39:18 -05:00
Leland Lucius
5fe26bc738 AUP3: Fix build 2020-07-21 11:34:26 -05:00
Leland Lucius
6c70cb86ee AUP3: Use persistent prepared statements
SqliteSampleBlock now uses already prepared SQL statements for
all DB usage. This means that the statements  won't have to be
compiled each time they are used.
2020-07-21 09:04:50 -05:00
Paul Licameli
73c6225906 Correct space usage calculation for the clipboard in History dialog 2020-07-21 06:26:00 -04:00
Paul Licameli
f7400d86e9
Fix save project (#624)
* Fix typos in comments

* Correct the cleanup control flow in ProjectFileIO::SaveProject...

... so that it will not destroy the connection to the original database in
case CopyTo() the new file name fails.
2020-07-21 00:44:27 -05:00
Paul Licameli
b0a89070c2 Localize "<untitled>" 2020-07-20 21:54:41 -04:00
Paul Licameli
17a4958173
Unitary thread review (#623)
* Fix uninitialized members of ProjectFileIO...

... which fixes this problem I observed:

Opening a previously saved project, saving-as to another path, then exiting
Audacity, gives a progress dialog waiting for checkpoints to end, which doesn't
go away

* Remove two mutexes...

... One wasn't used at all, and another was only ever used by one thread, and
then not correctly unlocked for each locking on all possible paths.

* Values that the worker thread writes and main reads should be atomic

* Remember to close db connections even after failure to open
2020-07-20 20:17:45 -05:00
Paul Licameli
061208c5cf Remove obsolete mentions of DirManager in comments 2020-07-20 19:03:40 -04:00
Paul Licameli
bd6536f3c4 Remove obsolete mentions of blockfiles in comments & incomplete types 2020-07-20 19:03:31 -04:00
Leland Lucius
eaaa782730 AUP3: Offer project name during Save As 2020-07-20 17:27:34 -05:00
Paul Licameli
9ffd169aa7
Various unitary fixes (#622)
* some comments

* No intermediate arrays (of arrays) of strings for query results...

... instead, let any query pass its own lambda to collect row data directly
however it needs to, for a bit of efficiency.  Also the precautions of a new
GuardedCall
2020-07-20 17:11:43 -05:00
Leland Lucius
af23a14bdb AUP3: Change message text 2020-07-20 16:34:48 -05:00
Leland Lucius
5652b9b039 AUP3: Automatically save a permanent project
If it was recovered.
2020-07-20 13:37:36 -05:00
Leland Lucius
d48ec11578 AUP3: UP-37 Crash with an empty project
And a bit of cleanup
2020-07-20 12:51:01 -05:00
Leland Lucius
84f363ee07 AUP3: Simplify checkpoing and add checkpoint progress dialog
Also move the project file closure out of the ProjectFileIO
destructor and does it before the project file window is
destroyed.
2020-07-20 11:10:31 -05:00
Leland Lucius
d2b4a0e488 AUP3: Put checkpointing in a separate thread
This is highly experimental.  It's defers most checkpointing
to a separate thread to see if we get better throughput and
less choppiness when applying effects.
2020-07-19 03:28:02 -05:00
Leland Lucius
e669b365f1 AUP3: Remove unneeded error message 2020-07-18 09:25:10 -05:00
Paul Licameli
bb9a881c2a
Canonicalize integers in binary blob format, BREAKING COMPATIBILITY... (#616)
... with .aup3 projects saved earlier in 3.0.0 development, except for 32 bit
Windows builds.

Use fixed-width integer types when writing the binary format blobs, not
bool, short, int, size_t, ..., which might vary among machines and so make
.aup3 files non-portable.

Choose the widths to write whatever is narrowest among the four builds; this
makes a difference only for long and size_t which are 32 bits in the 32 bit
Windows build.  (long is also 32 bits on the 64 bit Windows build.)

Also normalize the endianness to little, in case that ever matters on other
future processors.

Didn't attempt the same for the floating point types.
2020-07-17 23:59:27 -05:00
Leland Lucius
17268edf4b AUP3: Rename empty project after importing AU* projects 2020-07-17 20:46:08 -05:00
Leland Lucius
df4f3bd4e2 AUP3: "All supported files" filter missing AUP3 extension 2020-07-17 20:45:54 -05:00
Leland Lucius
1f87d4f716 AUP3: Fix build 2020-07-17 17:23:23 -05:00
Leland Lucius
93d9303c3d AUP3: Many corrections and (safe) speed ups
This reenables synchronous mode by default.  However, for processing
where a power cut or crash can be tolerated, synchronous and journaling
are disabled.  Once the processing is complete, they are reenabled.

Types of processing that are like this are "Save As", "Backup Project",
and "Vacuuming". They all write to a separate project file while
running, so the real project file is safe.

Unfortunately, effects are back to be slow and sluggish.

I believe I've address all of the weird file corruption issues and
I'll continue to continue testing for these.
2020-07-17 16:17:42 -05:00
Michael Pannekoek
c0ec20a641
fix asio build on windows (#615)
fix check for if ASIOSDK_DIR is defined, according to https://cmake.org/cmake/help/latest/variable/ENV.html
2020-07-17 01:52:24 -05:00
David Bailes
c174b254a1 Bug 2487 - Playback meters and preview of non-real-time effect
Problem:
Playback meters do not respond during preview of non-real-time effect.

Commit ba6db6e added the meters into AudioIOStartStreamOptions.
However Effect::Preview(bool) was not modified to set the playback meter.

Fix:
In Effect::Preview(bool), use DefaultPlayOptions, which includes a playback meter.
2020-07-16 14:41:48 +01:00