diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-15 14:41:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-15 14:44:05 +0200 |
commit | 04e7cfabbe58605e6770adbd9e27bf871a957bef (patch) | |
tree | 422e05f8dc36f1e9c9138eba704668b7f23bba56 /libs/ardour/ardour | |
parent | 551e20b926e164b3579d5e6b39f5e2fcb1ced93e (diff) |
prepare peak-file cleanup/recreate.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audiosource.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index ad7884e4f4..345d424cf3 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -96,6 +96,7 @@ class LIBARDOUR_API AudioSource : virtual public Source, } virtual int setup_peakfile () { return 0; } + int close_peakfile (); int prepare_for_peakfile_writes (); void done_with_peakfile_writes (bool done = true); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 79eb2162da..6b71e3c1ed 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -191,6 +191,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop bool reconnection_in_progress() const { return _reconnecting_routes_in_progress; } bool deletion_in_progress() const { return _state_of_the_state & Deletion; } bool routes_deletion_in_progress() const { return _route_deletion_in_progress; } + bool peaks_cleanup_in_progres() const { return _state_of_the_state & PeakCleanup; } PBD::Signal0<void> DirtyChanged; @@ -505,7 +506,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop Deletion = 0x4, InitialConnecting = 0x8, Loading = 0x10, - InCleanup = 0x20 + InCleanup = 0x20, + PeakCleanup = 0x40 }; StateOfTheState state_of_the_state() const { return _state_of_the_state; } @@ -661,7 +663,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop void add_source (boost::shared_ptr<Source>); void remove_source (boost::weak_ptr<Source>); - void cleanup_regions(); + void cleanup_regions(); + bool can_cleanup_peakfiles () const; + int cleanup_peakfiles (); int cleanup_sources (CleanupReport&); int cleanup_trash_sources (CleanupReport&); @@ -1243,6 +1247,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop gint _suspend_save; /* atomic */ volatile bool _save_queued; Glib::Threads::Mutex save_state_lock; + Glib::Threads::Mutex peak_cleanup_lock; int load_options (const XMLNode&); int load_state (std::string snapshot_name); |