bool write_section_to(boost::shared_ptr<MidiSource> source,
const Glib::Threads::Mutex::Lock& source_lock,
- Evoral::Beats begin = Evoral::MinBeats,
- Evoral::Beats end = Evoral::MaxBeats,
+ Evoral::Beats begin = Evoral::Beats(),
+ Evoral::Beats end = std::numeric_limits<Evoral::Beats>::max(),
bool offset_events = false);
// MidiModel doesn't use the normal AutomationList serialisation code
*/
int write_to (const Lock& lock,
boost::shared_ptr<MidiSource> newsrc,
- Evoral::Beats begin = Evoral::MinBeats,
- Evoral::Beats end = Evoral::MaxBeats);
+ Evoral::Beats begin = Evoral::Beats(),
+ Evoral::Beats end = std::numeric_limits<Evoral::Beats>::max());
/** Export the midi data in the given time range to another MidiSource
* \param newsrc MidiSource to which data will be written. Should be a
newsrc->copy_automation_state_from (this);
if (_model) {
- if (begin == Evoral::MinBeats && end == Evoral::MaxBeats) {
+ if (begin == Evoral::Beats() && end == std::numeric_limits<Evoral::Beats>::max()) {
_model->write_to (newsrc, newsrc_lock);
} else {
_model->write_section_to (newsrc, newsrc_lock, begin, end);
/* force a reload of the model if the range is partial */
- if (begin != Evoral::MinBeats || end != Evoral::MaxBeats) {
+ if (begin != Evoral::Beats() || end != std::numeric_limits<Evoral::Beats>::max()) {
newsrc->load_model (newsrc_lock, true);
} else {
newsrc->set_model (newsrc_lock, _model);
if (!ms->model()) {
ms->load_model (lm);
}
- if (ms->write_to (lm, newsrc, Evoral::MinBeats, Evoral::MaxBeats)) {
+ if (ms->write_to (lm, newsrc, Evoral::Beats(), std::numeric_limits<Evoral::Beats>::max())) {
error << string_compose (_("Session-Save: Failed to copy MIDI Source '%1' for snapshot"), ancestor_name) << endmsg;
} else {
if (snapshot_type == SnapshotKeep) {