uint32_t combine_ops() const { return _combine_ops; }
void set_layer (boost::shared_ptr<Region>, double);
+
+ void set_capture_insertion_in_progress (bool yn);
protected:
friend class Session;
bool in_flush;
bool in_partition;
bool _frozen;
+ bool _capture_insertion_underway;
uint32_t subcnt;
PBD::ID _orig_track_id;
uint32_t _combine_ops;
// cerr << _name << ": there are " << capture_info.size() << " capture_info records\n";
_playlist->clear_changes ();
+ _playlist->set_capture_insertion_in_progress (true);
_playlist->freeze ();
for (buffer_position = c->front()->write_source->last_capture_start_frame(), ci = capture_info.begin(); ci != capture_info.end(); ++ci) {
}
_playlist->thaw ();
+ _playlist->set_capture_insertion_in_progress (false);
_session.add_command (new StatefulDiffCommand (_playlist));
}
/* Top's fade-in will cause an implicit fade-out of bottom */
framecnt_t len = 0;
- switch (_session.config.get_xfade_model()) {
- case FullCrossfade:
- len = bottom->last_frame () - top->first_frame ();
- break;
- case ShortCrossfade:
+
+ if (_capture_insertion_underway) {
len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
- break;
+ } else {
+ switch (_session.config.get_xfade_model()) {
+ case FullCrossfade:
+ len = bottom->last_frame () - top->first_frame ();
+ break;
+ case ShortCrossfade:
+ len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
+ break;
+ }
}
top->set_fade_in_active (true);
/* Top's fade-out will cause an implicit fade-in of bottom */
framecnt_t len = 0;
- switch (_session.config.get_xfade_model()) {
- case FullCrossfade:
- len = top->last_frame () - bottom->first_frame ();
- break;
- case ShortCrossfade:
+
+ if (_capture_insertion_underway) {
len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
- break;
+ } else {
+ switch (_session.config.get_xfade_model()) {
+ case FullCrossfade:
+ len = top->last_frame () - bottom->first_frame ();
+ break;
+ case ShortCrossfade:
+ len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
+ break;
+ }
}
top->set_fade_out_active (true);
using namespace PBD;
namespace ARDOUR {
-namespace Properties {
-PBD::PropertyDescriptor<bool> regions;
-}
+ namespace Properties {
+ PBD::PropertyDescriptor<bool> regions;
+ }
}
struct ShowMeTheList {
in_partition = false;
subcnt = 0;
_frozen = false;
+ _capture_insertion_underway = false;
_combine_ops = 0;
_session.history().BeginUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::begin_undo, this));
check_crossfades (*i);
}
}
+
+void
+Playlist::set_capture_insertion_in_progress (bool yn)
+{
+ _capture_insertion_underway = yn;
+}