diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d37a90408d..0842dc2d72 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1405,6 +1405,9 @@ public: void start_domain_bounce (Temporal::DomainBounceInfo&); void finish_domain_bounce (Temporal::DomainBounceInfo&); + void enable_file_format_reset (); + void disable_file_format_reset (); + protected: friend class AudioEngine; void set_block_size (pframes_t nframes); @@ -2412,6 +2415,7 @@ private: void handle_slots_empty_status (std::weak_ptr const &); void time_domain_changed (); + uint32_t _no_file_format_reset; }; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index fd30127115..1efdad5af6 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -608,6 +608,13 @@ enum HeaderFormat { FLAC, }; +struct LiveTraxFileFormat { + LiveTraxFileFormat (SampleFormat sff, HeaderFormat hff) : sf (sff), hf (hff) {} + + SampleFormat sf; + HeaderFormat hf; +}; + struct PeakData { typedef Sample PeakDatum; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 8255dc7774..b4c0d1ae50 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -345,6 +345,7 @@ Session::Session (AudioEngine &eng, , _pending_cue (-1) , _active_cue (-1) , tb_with_filled_slots (0) + , _no_file_format_reset (0) { _suspend_save.store (0); _playback_load.store (0); @@ -6076,9 +6077,27 @@ Session::unmark_insert_id (uint32_t id) } } +void +Session::enable_file_format_reset () +{ + if (_no_file_format_reset) { + _no_file_format_reset--; + } +} + +void +Session::disable_file_format_reset () +{ + _no_file_format_reset++; +} + void Session::reset_native_file_format () { + if (_no_file_format_reset) { + return; + } + std::shared_ptr rl = routes.reader (); for (auto const& i : *rl) {