Less code.
[ardour.git] / libs / ardour / session_state.cc
index dea341bf15b31f4f86af2d276b155028658333ba..93245d6d01737b95df1747478ede9405d64426dd 100644 (file)
@@ -225,7 +225,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
 
        /* default short fade = 15ms */
 
-       Crossfade::set_short_xfade_length ((nframes_t) floor (config.get_short_xfade_seconds() * frame_rate()));
+       Crossfade::set_short_xfade_length ((framecnt_t) floor (config.get_short_xfade_seconds() * frame_rate()));
        SndFileSource::setup_standard_crossfades (*this, frame_rate());
 
        last_mmc_step.tv_sec = 0;
@@ -1017,7 +1017,7 @@ Session::state(bool full_state)
        if (full_state) {
 
                node->add_property ("name", _name);
-               snprintf (buf, sizeof (buf), "%" PRId32, _nominal_frame_rate);
+               snprintf (buf, sizeof (buf), "%" PRId64, _nominal_frame_rate);
                node->add_property ("sample-rate", buf);
 
                if (session_dirs.size() > 1) {
@@ -3186,14 +3186,14 @@ Session::restore_history (string snapshot_name)
                                        ut->add_command(c);
                                }
 
-                       } else if (n->name() == "DiffCommand") {
-                               PBD::ID  id(n->property("midi-source")->value());
+                       } else if (n->name() == "NoteDiffCommand") {
+                               PBD::ID id (n->property("midi-source")->value());
                                boost::shared_ptr<MidiSource> midi_source =
                                        boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
                                if (midi_source) {
-                                       ut->add_command(new MidiModel::DiffCommand(midi_source->model(), *n));
+                                       ut->add_command (new MidiModel::NoteDiffCommand(midi_source->model(), *n));
                                } else {
-                                       error << _("Failed to downcast MidiSource for DiffCommand") << endmsg;
+                                       error << _("Failed to downcast MidiSource for NoteDiffCommand") << endmsg;
                                }
 
                        } else if (n->name() == "StatefulDiffCommand") {