13
0

changes required to operate with the Evoral::Beats ticktime commit

This commit is contained in:
Paul Davis 2017-09-13 18:48:16 -04:00
parent 5ef0135283
commit 6f553ce988
4 changed files with 7 additions and 7 deletions

View File

@ -265,8 +265,8 @@ public:
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

View File

@ -62,8 +62,8 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha
*/
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

View File

@ -408,7 +408,7 @@ MidiSource::write_to (const Lock& lock, boost::shared_ptr<MidiSource> newsrc, Ev
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);
@ -422,7 +422,7 @@ MidiSource::write_to (const Lock& lock, boost::shared_ptr<MidiSource> newsrc, Ev
/* 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);

View File

@ -1254,7 +1254,7 @@ Session::state (bool full_state, snapshot_t snapshot_type)
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) {