diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index f83916176c..472cc6afb7 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -344,7 +344,7 @@ SMFSource::write_unlocked (const Lock& lock, break; } - if ((cnt != std::numeric_limits::max()) && + if ((cnt != timecnt_t::max (cnt.time_domain())) && (time > pos_samples + _capture_length + cnt_samples)) { /* The diskstream doesn't want us to write everything, and this event is past the end of this block, so we're done for now. */