... This only cuts and pastes some functions from FileNames to another new file
and namespace, and changes namespace qualifiers where they are called.
The cycle resulted because of the need to include widgets/ErrorDialog.h
* Revert "AUP3: Don't delete sample blocks prematurely"
This reverts commit c1884349d5.
* "Don't delete sample blocks prematurely" fixed otherwise...
... and very simply.
Problem was that, only for an interactive effect (like Bass and Treble), the
save point was created, rolled back, created again, then committed.
But (unlike with the non-savepoint commands, even if savepoint is outermost),
rolling back a savepoint really just rewinds it without removing it -- therefore
the second savepoint was inner, but the first (outer) was never committed, so
some changes failed to persist.
Solution: add a commit after rollback of savepoint to implement destructor
of AutoCommitTransaction.
The reversion of c188434 also leaves AutoCommitTransaction as a better RAII
style operation. Rollback changes by default -- keep changes only if
success is explicitly indicated.
* Rename AutoCommitTransaction as TransactionScope...
... More appropriately, since it's now the rollback that is automatic but
the commit that must be explicit
* 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
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
* 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
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.
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.
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.
Problem:
On opening, the units were always LUFS, and the "treat stereo as dual-mono" check box was always available.
Fix:
On opening, adjust the controls which depend on the value of the Normalize choice.
... Problem is that the delayed undo handling (in the lambda in AudacityApp ::
OnExceptionInMainLoop) should itself have only non-throwing steps.
But there was a redundant attempt at autosaving in ProjectHistory ::
RollbackState, which itself requires another data base write.
But when "rolling back" the in-memory structures to whatever the current state
of undo history is, we can assume that any required autosave was completed
before the current state of undo history was set.
So for rollback only, do not autosave again when discarding changes and
restoring the state. (But do it still, throwing on failure, when moving around
in the undo history, among saved states. We do want to keep the last autosave
consistent with the in-memory state.)
!!! 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.
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.
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.
* Eliminate ModuleManagerInterface...
... It was there only to provide RegisterModule(), but that was not used
anywhere. So simplify.
* Remove nested #include of ModuleInterface.h
... Require the declarations to be in .h files, to be sure graph.pl detects the
dependencies.
Only one more #include was needed in Nyquist.cpp. This doesn't reveal any
more hidden cycles.
... Requires some more wx header inclusions, a renaming of CopyFile (to avoid
colliding with a certain macro changing it to CopyFileW), and an explicit
deletion of a copy constructor and assignment (to avoid generation of
std::vector members for an incomplete type)
... That is, present translators with msgids containing only the descriptions
of the file types. No punctuation.
This eliminates the last wxFileDialog, replacing it with FileDialogWrapper.
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.
This commit makes ONLY such changes, and comments in Internat.h. It is big
but quite harmless.
The intention is to introduce a type distinction in a later release, by defining
XXO differently. XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
... Moved many misplaced ones, which msgfmt would not have extracted into
audacity.pot.
Duplicated some of them, to appear with related but distinct msgids.
Added a few new comments.
Deleted one that was no longer needed in ProjectManager.cpp.