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

12234 Commits

Author SHA1 Message Date
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
Leland Lucius
6ffced4881 AUP3: Adds connection configuration and ...
Optimizes a couple of sample block copy loops by only preparing
the statement once outside the loop.

The connection configuration ensure that all connections use the same
settings...assuming you remember to configure it after opening. :-)

The possibly controversial setting is the "PRAGMA synchronous = off"
2020-07-16 01:10:54 -05:00
SteveDaulton
e2f9090723 Fix bug 2502 - Nyquist: Progress bar may not work when generating Rhythm Track 2020-07-15 18:58:47 +01:00
Leland Lucius
79b8c65f60 AUP3: Make the AUP3/AUP file types consistent 2020-07-15 11:58:45 -05:00
Leland Lucius
3954998083 AUP3: UP-33 History window shows misleading "space used"
The "Project file size" field in the History dialog didn't work
because it didn't take the journal size into account. So, I removed
the field and improved the size calculation a bit for the sample
blocks.
2020-07-15 09:43:48 -05:00
Leland Lucius
5eb9f75150 AUP3: UP-33 History window shows misleading "space used"
Possible fix...will need feedback.
2020-07-15 09:26:23 -05:00
Leland Lucius
2accd9e93f AUP3: Bug 2187 - no error message) when using a missing aliased audio file 2020-07-15 08:40:39 -05:00
Leland Lucius
01181c8f21 AUP3: UP-29 Save Project does not propagate project name to Audacity window 2020-07-15 08:28:00 -05:00
Leland Lucius
176eb49a1e AUP3: Several little fixes
Handle bypassing of timetracks in AUP importer correctly
Add bypassing of timetracks in AUP3 importer
Move/add AUP3 in filter lists.
2020-07-15 07:57:20 -05:00
Leland Lucius
5bc3ae659c AUP3: Added AUP3 importer and improved progress dialogs 2020-07-15 01:32:48 -05:00
Leland Lucius
1ec7fd56c1 Re-add ASIO build option 2020-07-13 23:37:26 -05:00
Leland Lucius
0fbabb0e3f AUP3: Only vacuum if unused space is more than 20% 2020-07-13 13:01:36 -05:00
Leland Lucius
6f233cbff5 AUP3: Fix build issues 2020-07-13 09:48:37 -05:00
Leland Lucius
6193598b90 AUP3: Ensure that the update hook is removed 2020-07-13 09:08:31 -05:00
Leland Lucius
25d9e1c387 AUP3: Add better progress to AUP importer 2020-07-13 00:59:12 -05:00
Leland Lucius
e75ab6eaad AUP3: Fix last commit
I hate conflicts...I ALWAYS get them wrong.
2020-07-13 00:45:14 -05:00
Leland Lucius
0815344e5d AUP3: Reworked CopyTo() yet again
This time it has the potential to produce much smaller
output files since it ONLY copies the active blocks and
not all of the blocks related to undo history.  This is
done for "Save As" and "Backup Project".  Normal save
can't take advantage of this, but then it really doesn't
need it as it has to depend on vacuuming.

The vacuuming at close has been adjusted to utilize CopyTo()
so it should produce similarly small files as long as the
vacuuming happens when the project is definitely closing.
2020-07-13 00:04:54 -05:00
Leland Lucius
a0008831e0 Revert "AUP3: Reworked CopyTo() yet again"
A bit more thought needs to do into this.
2020-07-12 10:55:54 -05:00
Leland Lucius
e3c5563d35 AUP3: Reworked CopyTo() yet again
This time it has the potential to produce much smaller
output files since it ONLY copies the active blocks and
not all of the blocks related to undo history.
2020-07-12 10:39:37 -05:00
Leland Lucius
5ffff72d35 AUP3: Fix includes 2020-07-09 14:08:21 -05:00
Leland Lucius
251da3bb3b AUP3: First go at the AUP importer
Near as I can tell, it's pretty much done. Feeding all manner of
.aup projects will definitely need to be done. It would be best
to feed it REAL projects, not the contrived ones I've been playing
with.
2020-07-12 03:53:25 -05:00
Paul Licameli
f34b9697c0 Oops, the once_flag must be static! 2020-07-11 23:44:20 -04:00
Paul Licameli
87d82e76c7
Char width info goes in the unique data dictionary only once per run (#613) 2020-07-11 13:10:58 -05:00
Paul Licameli
6eb6aab8f5 Commit autosave blobs during recording only as needed...
... when there really is at least one new sample block committed to the table,
which is typically only once in about every six seconds, with the default rate
and sample format.

Also renamed a callback function more aptly, since blocks are not files any
more.
2020-07-11 05:13:38 -04:00
Paul Licameli
047fa18afd Remove unused TrackPanel::MakeParentModifyState 2020-07-11 05:11:09 -04:00
Paul Licameli
cea658d9eb
Fix the reading of autosave files... (#610)
* Fix the reading of autosave files...

... problem was in recreating strings from buffers, but copying too many because
null terminators were lacking.

* Autosave during recording backs up all tracks correctly...

... whether to new track, or appending; and it doesn't lose the other tracks
besides the recording.

It is also unnecessary when just starting to record, so remove one call.
2020-07-11 00:49:37 -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
David Bailes
975ee0cc07 Bug 2496 - Label edit typing prepends selected text
Problem:
labelStruct, a copy of the label is initialized before call to RemoveSelectedText() which acts on the real label. So when the label is updated using labelStruct, the selected text has not been removed.

Fix:
Initialize labelStruct after the call to RemoveSelectedText().
2020-07-10 10:37:02 +01:00
Leland Lucius
b12fafbea0 AUP3: Fix stupied build failure 2020-07-10 01:32:56 -05:00
Leland Lucius
5b41115bd0 AUP3: Mostly rework of CopyTo()
It now uses VACUUM INTO instead of the SQLite backup API
in hopes that the copies will be smaller. And VACUUM INTO
is "supposed" to be faster, but time will tell.  It's easy
to put the backup API usage back in.

This also fixes a bit I missed with redoing the orphan block
handling that was reported by Paul.

And finally, it renames the AutoRecovery.cpp/.h files and AutoSaveFile
class to ProjectSerializer since the AutoSaveFile class is being
used for regular project documents now and it doesn't write to a
file anymore.

If anyone has a better idea for a name other than ProjectSerializer
feel free to change it.  I hate naming things.
2020-07-10 00:50:52 -05:00
Paul Licameli
7ad8849d32 When saving new project, put correct file name into MRU submenu...
... bug was introduced at 590d8c6d09fa2989f1e35ad3125965c801ece506
2020-07-09 19:17:23 -04:00
Paul Licameli
70ab645647 Let ESC key in pencil tool reclaim abandoned sample blocks sooner 2020-07-09 16:30:37 -04:00