X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_state.cc;h=c228f3c47b92ae1d27dbc9c9f4a9ee3d0705ecee;hb=44fd104ada0fbd8b76d34150e941d85d6de6f81b;hp=70abd01a724dda19db0d8d2ac1bdcfc5f2e91654;hpb=997e4b1f9cd7ccfc704b7c035051da7f60d831e7;p=ardour.git diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 70abd01a72..c228f3c47b 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -168,7 +168,8 @@ Session::first_stage_init (string fullpath, string snapshot_name) pending_locate_frame = 0; pending_locate_roll = false; pending_locate_flush = false; - dstream_buffer_size = 0; + audio_dstream_buffer_size = 0; + midi_dstream_buffer_size = 0; state_tree = 0; state_was_pending = false; set_next_event (); @@ -296,9 +297,9 @@ Session::second_stage_init (bool new_session) return -1; } - /*if (start_midi_thread ()) { + if (start_midi_thread ()) { return -1; - }*/ + } // set_state() will call setup_raid_path(), but if it's a new session we need // to call setup_raid_path() here. @@ -352,7 +353,7 @@ Session::second_stage_init (bool new_session) BootMessage (_("Reset Remote Controls")); - //send_full_time_code (); + send_full_time_code (0); _engine.transport_locate (0); deliver_mmc (MIDI::MachineControl::cmdMmcReset, 0); deliver_mmc (MIDI::MachineControl::cmdLocate, 0); @@ -2989,8 +2990,16 @@ Session::restore_history (string snapshot_name) ut->add_command (c); } + } else if (n->name() == "DeltaCommand") { + PBD::ID id(n->property("midi_source")->value()); + boost::shared_ptr midi_source = + boost::dynamic_pointer_cast(source_by_id(id)); + if(midi_source) { + ut->add_command(new MidiModel::DeltaCommand(midi_source->model(), *n)); + } else { + error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg; + } } else { - error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg; } }